0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-10 05:58:56 +02:00

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, 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]) 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 m::user user
{ {
user_id user_id

View file

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