25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-20 16:15:59 +01:00

Perform user part substitution in ldap_rfilter (EJAB-1555)

This commit is contained in:
Evgeniy Khramtsov 2012-04-17 17:19:53 +10:00
parent 5a09d671ab
commit e616d2686f

View File

@ -329,10 +329,13 @@ eldap_search(State, FilterParseArgs, AttributesList) ->
[]
end.
get_user_displayed_groups({_User, Host}) ->
get_user_displayed_groups({User, Host}) ->
{ok, State} = eldap_utils:get_state(Host, ?MODULE),
GroupAttr = State#state.group_attr,
Entries = eldap_search(State, [State#state.rfilter], [GroupAttr]),
Entries = eldap_search(
State,
[eldap_filter:do_sub(State#state.rfilter, [{"%u", User}])],
[GroupAttr]),
Reply = lists:flatmap(
fun(#eldap_entry{attributes = Attrs}) ->
case Attrs of