mirror of
https://github.com/matrix-construct/construct
synced 2025-03-14 05:20:17 +01:00
modules/admin: Apply REQUIRES_OPER method flag; simplify.
This commit is contained in:
parent
605245953a
commit
3dafa47ac3
2 changed files with 2 additions and 8 deletions
|
@ -37,7 +37,7 @@ ircd::m::admin::post_method
|
|||
{
|
||||
deactivate_resource, "POST", handle_post,
|
||||
{
|
||||
post_method.REQUIRES_AUTH
|
||||
post_method.REQUIRES_OPER
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -56,12 +56,6 @@ ircd::m::admin::handle_post(client &client,
|
|||
url::decode(user_id, request.parv[0])
|
||||
};
|
||||
|
||||
if(!is_oper(request.user_id))
|
||||
throw m::ACCESS_DENIED
|
||||
{
|
||||
"You are not an operator."
|
||||
};
|
||||
|
||||
m::user user
|
||||
{
|
||||
user_id
|
||||
|
|
|
@ -38,7 +38,7 @@ ircd::m::admin::get_method
|
|||
{
|
||||
users_resource, "GET", handle_get,
|
||||
{
|
||||
get_method.REQUIRES_AUTH
|
||||
get_method.REQUIRES_OPER
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue