mirror of
https://github.com/processone/ejabberd.git
synced 2025-01-03 18:02:28 +01:00
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 =
|
AccessCommandsAllowed =
|
||||||
lists:filter(
|
lists:filter(
|
||||||
fun({Access, Commands, ArgumentRestrictions}) ->
|
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
|
case check_access(Access, Auth) of
|
||||||
true ->
|
true ->
|
||||||
check_access_command(Commands, Command, ArgumentRestrictions,
|
check_access_command(Commands, Command, ArgumentRestrictions,
|
||||||
|
Loading…
Reference in New Issue
Block a user