aboutsummaryrefslogtreecommitdiff
path: root/src/ejabberd_commands.erl
diff options
context:
space:
mode:
authorPaweł Chmielowski <pchmielowski@process-one.net>2016-06-21 12:28:53 +0200
committerPaweł Chmielowski <pchmielowski@process-one.net>2016-06-21 12:28:53 +0200
commit52d45604ba705bdf029eda6c7b39622b8f2a8ebe (patch)
treead46a4ec333e78ca93559abad75063d92e7f88eb /src/ejabberd_commands.erl
parentAdd acl:{access,shaper}_rules_validator for use in {mod_}opt_type() (diff)
Use new access_rules_validator in couple places
Diffstat (limited to 'src/ejabberd_commands.erl')
-rw-r--r--src/ejabberd_commands.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ejabberd_commands.erl b/src/ejabberd_commands.erl
index 1b7d777e6..9d41f50c2 100644
--- a/src/ejabberd_commands.erl
+++ b/src/ejabberd_commands.erl
@@ -761,7 +761,7 @@ is_admin(Name, Auth, Extra) ->
end,
AdminAccess = ejabberd_config:get_option(
commands_admin_access,
- fun(A) when is_atom(A) -> A end,
+ fun(V) -> V end,
none),
case acl:access_matches(AdminAccess, ACLInfo, Server) of
allow ->
@@ -773,8 +773,7 @@ is_admin(Name, Auth, Extra) ->
deny -> false
end.
-opt_type(commands_admin_access) ->
- fun(A) when is_atom(A) -> A end;
+opt_type(commands_admin_access) -> fun acl:access_rules_validator/1;
opt_type(commands) ->
fun(V) when is_list(V) -> V end;
opt_type(_) -> [commands, commands_admin_access].