More strict check for commands with policy user

This commit is contained in:
Paweł Chmielowski 2016-05-30 23:03:38 +02:00
parent 17f87eb899
commit fc2b7018cc
1 changed files with 6 additions and 1 deletions

View File

@ -656,7 +656,12 @@ check_access(Command, Access, Auth, CallerInfo)
{ok, User, Server} ->
check_access2(Access, CallerInfo#{usr => jid:split(jid:make(User, Server, <<>>))}, Server);
no_auth_provided ->
check_access2(Access, CallerInfo, global);
case Command#ejabberd_commands.policy of
user ->
false;
_ ->
check_access2(Access, CallerInfo, global)
end;
_ ->
false
end;