From a41336be9ff7a8f858ddbad9941f1551ad5619d5 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 29 Aug 2006 06:45:40 +0000 Subject: [PATCH] Some group-application fixes git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4531 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../admin/groups/class_groupApplication.inc | 24 +++++++++---------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/plugins/admin/groups/class_groupApplication.inc b/plugins/admin/groups/class_groupApplication.inc index f16e89cc1..133717d6c 100644 --- a/plugins/admin/groups/class_groupApplication.inc +++ b/plugins/admin/groups/class_groupApplication.inc @@ -383,8 +383,12 @@ class appgroup extends plugin } /* Do we need to flip is_account state? */ - if (isset($_POST['modify_state'])){ - $this->is_account= !$this->is_account; + if(isset($_POST['modify_state'])){ + if($this->is_account && $this->acl_is_removeable()){ + $this->is_account= FALSE; + }elseif(!$this->is_account && $this->acl_is_createable()){ + $this->is_account= TRUE; + } } /* Do we represent a valid group? */ @@ -786,12 +790,12 @@ class appgroup extends plugin function getReleases() { - $dn = $this->config->current['BASE']; - $ldap = $this->config->get_ldap_link(); - $ldap->cd($dn); - $ldap->search("(&(objectClass=organizationalUnit)(objectClass=FAIbranch))",array("ou")); + $dn = $this->config->current['BASE']; + $filter = "(&(objectClass=organizationalUnit)(objectClass=FAIbranch))"; + $res = get_list($filter,"groups", $dn, array("ou"), GL_SUBSEARCH); + $ret =array(); - while($attrs = $ldap->fetch()){ + foreach($res as $attrs){ if(preg_match("/ou=apps,/",$attrs['dn'])){ $bb = preg_replace("/ou=apps,.*/","",$attrs['dn']); $parts = array_reverse(split("ou=",$bb)); @@ -1055,8 +1059,6 @@ class appgroup extends plugin /* Return plugin informations for acl handling */ function plInfo() - { - function plInfo() { return (array( "plShortName" => _("Applications"), @@ -1071,10 +1073,6 @@ class appgroup extends plugin "gosaApplicationParameter" => _("Application parameter")) )); } - - - - } } // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: ?> -- 2.30.2