Try to support access_commands in YAML (ejabberd-contrib#45)

This commit is contained in:
Badlop 2015-05-07 18:34:05 +02:00
parent b0b004b26e
commit 7ab6c4b4fd
1 changed files with 9 additions and 0 deletions

View File

@ -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,