summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Arendsen Hein <thomas@intevation.de>2007-02-28 17:58:50 (GMT)
committerThomas Arendsen Hein <thomas@intevation.de>2007-02-28 17:58:50 (GMT)
commit88533220b02f426769ba8cb9877ceb3dde009a12 (patch)
treef88b017ffb2a1245b8bb2bd13ada2d5a363cbbfd
parenta8712b43ca92ddd89e3ecff72b93e1d821127abd (diff)
downloadkolab-webadmin-88533220b02f426769ba8cb9877ceb3dde009a12.tar.gz
Fix kolab/issue1630 (Domain maintainer can see distribution lists from other domains)
(Patch from Tim Gerundt <gerundt at montanhydraulik.com>)
-rw-r--r--www/admin/distributionlist/index.php.in12
1 files changed, 11 insertions, 1 deletions
diff --git a/www/admin/distributionlist/index.php.in b/www/admin/distributionlist/index.php.in
index 343a129..73b5b92 100644
--- a/www/admin/distributionlist/index.php.in
+++ b/www/admin/distributionlist/index.php.in
@@ -46,7 +46,17 @@ $menuitems[$sidx]['selected'] = 'selected';
if( !$errors ) {
if (isset($_SESSION['base_dn'])) $base_dn = $_SESSION['base_dn'];
else $base_dn = 'k=kolab';
- $filter = "(&(!(cn=domains))(objectclass=kolabGroupOfNames))";
+ $domains = $ldap->domainsForMaintainerDn($auth->dn());
+ if( is_array($domains) ) {
+ $domainfilter='';
+ foreach( $domains as $dom ) {
+ $domainfilter .= '(cn=*@'.$ldap->escape($dom).')';
+ }
+ if( $domainfilter ) $domainfilter = "(|$domainfilter)";
+ } else {
+ $domainfilter= "";
+ }
+ $filter = "(&(!(cn=domains))$domainfilter(objectclass=kolabGroupOfNames))";
$result = ldap_search($ldap->connection, $base_dn, $filter);
if( $result ) {
$count = ldap_count_entries($ldap->connection, $result);