modules/admin: Apply REQUIRES_OPER method flag; simplify.

This commit is contained in:
Jason Volk 2023-03-02 19:42:02 -08:00
parent 605245953a
commit 3dafa47ac3
2 changed files with 2 additions and 8 deletions

View File

@ -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

View File

@ -38,7 +38,7 @@ ircd::m::admin::get_method
{
users_resource, "GET", handle_get,
{
get_method.REQUIRES_AUTH
get_method.REQUIRES_OPER
}
};