25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

Use correct field for oauth scope

This commit is contained in:
Paweł Chmielowski 2016-10-06 11:03:26 +02:00
parent 438dbc8bda
commit b01fbfadf3

View File

@ -261,7 +261,7 @@ matches_definition({_Name, {From, Who, What}}, Cmd, Module, Host, CallerInfo) ->
true ->
case From == [] orelse lists:member(Module, From) of
true ->
Scope = maps:get(scope, CallerInfo, none),
Scope = maps:get(oauth_scope, CallerInfo, none),
lists:any(
fun({access, Access}) when Scope == none ->
acl:access_matches(Access, CallerInfo, Host) == allow;