mirror of
https://github.com/processone/ejabberd.git
synced 2024-06-14 22:00:16 +02:00
Accept "add_commands: admin" in commands section not only "add_commands: - admin"
This fixes issue reported in #1518, and restores compatibility with what older version were accepting and what is documented.
This commit is contained in:
parent
b703b4f022
commit
ca0dd09944
|
@ -818,6 +818,8 @@ get_exposed_commands(Version) ->
|
|||
Cmds.
|
||||
|
||||
%% This is used to allow mixing command policy (like open, user, admin, restricted), with command entry
|
||||
expand_commands(L, OpenCmds, UserCmds, AdminCmds, RestrictedCmds) when is_atom(L) ->
|
||||
expand_commands([L], OpenCmds, UserCmds, AdminCmds, RestrictedCmds);
|
||||
expand_commands(L, OpenCmds, UserCmds, AdminCmds, RestrictedCmds) when is_list(L) ->
|
||||
lists:foldl(fun(open, Acc) -> OpenCmds ++ Acc;
|
||||
(user, Acc) -> UserCmds ++ Acc;
|
||||
|
|
Loading…
Reference in New Issue
Block a user