From a16e5a7055bd17979cfd171474d2b595dab3392d Mon Sep 17 00:00:00 2001 From: Badlop Date: Wed, 12 Jun 2024 23:38:58 +0200 Subject: [PATCH] WebAdmin: Remove webadmin_view for now, as commands allow more fine-grained permissions --- src/ejabberd_web_admin.erl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ejabberd_web_admin.erl b/src/ejabberd_web_admin.erl index 742ac262c..ea43a63fd 100644 --- a/src/ejabberd_web_admin.erl +++ b/src/ejabberd_web_admin.erl @@ -73,13 +73,13 @@ get_acl_rule([<<"vhosts">>], _) -> %% The pages of a vhost are only accessible if the user is admin of that vhost: get_acl_rule([<<"server">>, VHost | _RPath], Method) when Method =:= 'GET' orelse Method =:= 'HEAD' -> - {VHost, [configure, webadmin_view]}; + {VHost, [configure]}; get_acl_rule([<<"server">>, VHost | _RPath], 'POST') -> {VHost, [configure]}; %% Default rule: only global admins can access any other random page get_acl_rule(_RPath, Method) when Method =:= 'GET' orelse Method =:= 'HEAD' -> - {global, [configure, webadmin_view]}; + {global, [configure]}; get_acl_rule(_RPath, 'POST') -> {global, [configure]}. @@ -581,7 +581,7 @@ list_vhosts_allowed(JID) -> Hosts = ejabberd_option:hosts(), lists:filter(fun (Host) -> any_rules_allowed(Host, - [configure, webadmin_view], + [configure], JID) end, Hosts).