|
|
|
@ -17,16 +17,16 @@ HERE |
|
|
|
|
# (Only available on iPasserelle) |
|
|
|
|
|
|
|
|
|
our @groups = split(/[;,]/, ($ejabberd{'AllowedGroups'} || '')); |
|
|
|
|
my $filter = ''; |
|
|
|
|
our $groupFilter = ''; |
|
|
|
|
if (scalar(@groups) == 1){ |
|
|
|
|
$filter = "(posixMemberOf=$groups[0])"; |
|
|
|
|
$groupFilter = "(posixMemberOf=$groups[0])"; |
|
|
|
|
} |
|
|
|
|
elsif (scalar(@groups) gt 1){ |
|
|
|
|
$filter = '(|'; |
|
|
|
|
$filter .= "(posixMemberOf=$_)" foreach (@groups); |
|
|
|
|
$filter .= ')'; |
|
|
|
|
$groupFilter = '(|'; |
|
|
|
|
$groupFilter .= "(posixMemberOf=$_)" foreach (@groups); |
|
|
|
|
$groupFilter .= ')'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$OUT .= ($filter eq '') ? '' : '{ldap_filter, "' . $filter . '"}.'; |
|
|
|
|
$OUT .= ($groupFilter eq '') ? '' : '{ldap_filter, "' . $groupFilter . '"}.'; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|