Try to support access_commands in YAML (ejabberd-contrib#45)
This commit is contained in:
parent
b0b004b26e
commit
7ab6c4b4fd
|
@ -376,6 +376,15 @@ check_access_commands(AccessCommands, Auth, Method, Command, Arguments) ->
|
|||
AccessCommandsAllowed =
|
||||
lists:filter(
|
||||
fun({Access, Commands, ArgumentRestrictions}) ->
|
||||
case check_access(Access, Auth) of
|
||||
true ->
|
||||
check_access_command(Commands, Command, ArgumentRestrictions,
|
||||
Method, Arguments);
|
||||
false ->
|
||||
false
|
||||
end;
|
||||
({Access, Commands}) ->
|
||||
ArgumentRestrictions = [],
|
||||
case check_access(Access, Auth) of
|
||||
true ->
|
||||
check_access_command(Commands, Command, ArgumentRestrictions,
|
||||
|
|
Loading…
Reference in New Issue