mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-28 16:34:13 +01:00
is_user_in_group/3 must check if user belongs to given Group from Host specified on third argument.
* is_user_in_group/3 was checking if given user (passed on first parameter as a bare jid) belonged to group of the server derived from this jid.
This commit is contained in:
parent
15f664af26
commit
0cbd702419
@ -602,10 +602,10 @@ get_user_displayed_groups(US) ->
|
||||
end, get_user_groups(US))),
|
||||
[Group || Group <- DisplayedGroups1, is_group_enabled(Host, Group)].
|
||||
|
||||
is_user_in_group({_U, S} = US, Group, Host) ->
|
||||
is_user_in_group(US, Group, Host) ->
|
||||
case catch mnesia:dirty_match_object(
|
||||
#sr_user{us=US, group_host={Group, Host}}) of
|
||||
[] -> lists:member(US, get_group_users(S, Group));
|
||||
[] -> lists:member(US, get_group_users(Host, Group));
|
||||
_ -> true
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user