mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Perform user part substitution in ldap_rfilter (EJAB-1555)
This commit is contained in:
parent
5a09d671ab
commit
e616d2686f
@ -329,10 +329,13 @@ eldap_search(State, FilterParseArgs, AttributesList) ->
|
|||||||
[]
|
[]
|
||||||
end.
|
end.
|
||||||
|
|
||||||
get_user_displayed_groups({_User, Host}) ->
|
get_user_displayed_groups({User, Host}) ->
|
||||||
{ok, State} = eldap_utils:get_state(Host, ?MODULE),
|
{ok, State} = eldap_utils:get_state(Host, ?MODULE),
|
||||||
GroupAttr = State#state.group_attr,
|
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(
|
Reply = lists:flatmap(
|
||||||
fun(#eldap_entry{attributes = Attrs}) ->
|
fun(#eldap_entry{attributes = Attrs}) ->
|
||||||
case Attrs of
|
case Attrs of
|
||||||
|
Loading…
Reference in New Issue
Block a user