mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Merge pull request #1036 from processone/shared-roster-ldap
Fix issue getting shared roster
This commit is contained in:
commit
4afe0b195c
File diff suppressed because it is too large
Load Diff
@ -354,7 +354,8 @@ db_tests(_) ->
|
||||
ldap_tests() ->
|
||||
[{ldap_tests, [sequence],
|
||||
[test_auth,
|
||||
vcard_get]}].
|
||||
vcard_get,
|
||||
ldap_shared_roster_get]}].
|
||||
|
||||
extauth_tests() ->
|
||||
[{extauth_tests, [sequence],
|
||||
@ -800,6 +801,13 @@ vcard_get(Config) ->
|
||||
send_recv(Config, #iq{type = get, sub_els = [#vcard{}]}),
|
||||
disconnect(Config).
|
||||
|
||||
ldap_shared_roster_get(Config) ->
|
||||
Item = #roster_item{jid = jid:from_string(<<"user2@ldap.localhost">>), name = <<"Test User 2">>,
|
||||
groups = [<<"group1">>], subscription = both},
|
||||
#iq{type = result, sub_els = [#roster{items = [Item]}]} =
|
||||
send_recv(Config, #iq{type = get, sub_els = [#roster{}]}),
|
||||
disconnect(Config).
|
||||
|
||||
vcard_xupdate_master(Config) ->
|
||||
Img = <<137, "PNG\r\n", 26, $\n>>,
|
||||
ImgHash = p1_sha:sha(Img),
|
||||
|
@ -10,6 +10,10 @@ dn: ou=users,dc=localhost
|
||||
ou: users
|
||||
objectClass: organizationalUnit
|
||||
|
||||
dn: ou=groups,dc=localhost
|
||||
ou: groups
|
||||
objectClass: organizationalUnit
|
||||
|
||||
dn: uid=test_single,ou=users,dc=localhost
|
||||
uid: test_single
|
||||
mail: test_single@localhost
|
||||
@ -33,3 +37,16 @@ objectClass: person
|
||||
jpegPhoto:: /9g=
|
||||
cn: Test Slave
|
||||
password: password
|
||||
|
||||
dn: uid=user2,ou=users,dc=localhost
|
||||
uid: user2
|
||||
mail: user2@localhost
|
||||
objectClass: person
|
||||
cn: Test User 2
|
||||
password: password
|
||||
|
||||
dn: cn=group1,ou=groups,dc=localhost
|
||||
objectClass: posixGroup
|
||||
memberUid: test_single
|
||||
memberUid: user2
|
||||
cn: group1
|
||||
|
@ -336,6 +336,15 @@ Welcome to this XMPP server."
|
||||
auth_method: ldap
|
||||
modules:
|
||||
mod_vcard_ldap: []
|
||||
mod_roster: [] # mod_roster is required by mod_shared_roster
|
||||
mod_shared_roster_ldap:
|
||||
ldap_auth_check: off
|
||||
ldap_base: "dc=localhost"
|
||||
ldap_rfilter: "(objectClass=posixGroup)"
|
||||
ldap_gfilter: "(&(objectClass=posixGroup)(cn=%g))"
|
||||
ldap_memberattr: "memberUid"
|
||||
ldap_ufilter: "(uid=%u)"
|
||||
ldap_userdesc: "cn"
|
||||
mod_adhoc: []
|
||||
mod_configure: []
|
||||
mod_disco: []
|
||||
|
Loading…
Reference in New Issue
Block a user