aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shchepin <alexey@process-one.net>2011-07-03 18:58:45 +0300
committerAlexey Shchepin <alexey@process-one.net>2011-07-03 18:58:45 +0300
commit2787df035c5f31d40b6afd3b9390210f7ec3fecb (patch)
tree904b149fdadf7a939c97d18ab11e9c357f078fe6
parentMinor mod_version bugfix (diff)
parentis_user_in_group/3 must check if user belongs to given Group from Host specif... (diff)
Merge branch '2.1.x' of git+ssh://git@gitorious.process-one.net/ejabberd/mainline.git into 2.1.x
-rw-r--r--src/mod_shared_roster.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mod_shared_roster.erl b/src/mod_shared_roster.erl
index 8faf3528d..286cac972 100644
--- a/src/mod_shared_roster.erl
+++ b/src/mod_shared_roster.erl
@@ -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.