mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Add test to demonstrate issue to retrieve roster with mod_shared_roster_ldap
This commit is contained in:
parent
a3a33bd5fc
commit
0afcf561d6
@ -354,7 +354,8 @@ db_tests(_) ->
|
||||
ldap_tests() ->
|
||||
[{ldap_tests, [sequence],
|
||||
[test_auth,
|
||||
vcard_get]}].
|
||||
vcard_get,
|
||||
ldap_shared_roster_vcard_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_vcard_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: []
|
||||
@ -415,7 +424,7 @@ listen:
|
||||
port: @@web_port@@
|
||||
module: ejabberd_http
|
||||
captcha: true
|
||||
loglevel: 4
|
||||
loglevel: 5
|
||||
max_fsm_queue: 1000
|
||||
modules:
|
||||
mod_adhoc: []
|
||||
|
Loading…
Reference in New Issue
Block a user