|
|
|
@ -3,7 +3,10 @@ |
|
|
|
|
if (($ejabberd{'SharedRoster'} || 'disabled') eq 'enabled'){ |
|
|
|
|
|
|
|
|
|
my $filter = ''; |
|
|
|
|
if (scalar(@groups) == 1){ |
|
|
|
|
if (scalar(@groups) == 0){ |
|
|
|
|
$filter = "(objectClass=mailboxRelatedObject)"; |
|
|
|
|
} |
|
|
|
|
elsif (scalar(@groups) == 1){ |
|
|
|
|
$filter = "(cn=$groups[0])"; |
|
|
|
|
} |
|
|
|
|
elsif (scalar(@groups) gt 1){ |
|
|
|
@ -15,13 +18,13 @@ if (($ejabberd{'SharedRoster'} || 'disabled') eq 'enabled'){ |
|
|
|
|
$OUT .=<<"HERE"; |
|
|
|
|
,{mod_shared_roster_ldap, [ |
|
|
|
|
{ldap_base, "$base"}, |
|
|
|
|
{ldap_rfilter, "(objectClass=mailboxRelatedObject)"}, |
|
|
|
|
{ldap_filter, "$filter"}, |
|
|
|
|
{ldap_gfilter, "(&(objectClass=mailboxRelatedObject)(cn=%g))"}, |
|
|
|
|
{ldap_ufilter, "(&(objectClass=inetOrgPerson)(uid=%u))"}, |
|
|
|
|
{ldap_rfilter, "$filter"}, |
|
|
|
|
{ldap_filter, ""}, |
|
|
|
|
{ldap_ufilter, "(uid=%u)"}, |
|
|
|
|
{ldap_groupattr, "cn"}, |
|
|
|
|
{ldap_groupdesc, "description"}, |
|
|
|
|
{ldap_memberattr, "memberUid"}, |
|
|
|
|
{ldap_memberattr_format,"%u"}, |
|
|
|
|
{ldap_useruid, "uid"}, |
|
|
|
|
{ldap_userdesc, "cn"} |
|
|
|
|
]} |
|
|
|
|