From: hickert Date: Wed, 21 Oct 2009 11:24:38 +0000 (+0000) Subject: Reenabled copy & paste for ACLroles. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=93de87a7f88b3a115104b40348ab24bb988b5b76;p=gosa.git Reenabled copy & paste for ACLroles. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14613 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/acl/class_aclRole.inc b/gosa-core/plugins/admin/acl/class_aclRole.inc index e78f0dfa1..748d4b9c7 100644 --- a/gosa-core/plugins/admin/acl/class_aclRole.inc +++ b/gosa-core/plugins/admin/acl/class_aclRole.inc @@ -49,6 +49,7 @@ class aclrole extends acl /* Role attributes */ var $gosaAclTemplate= ""; var $cn = ""; + var $orig_cn = ""; var $description = ""; var $orig_dn; var $orig_base; @@ -139,6 +140,7 @@ class aclrole extends acl $this->is_account= TRUE; $this->orig_base = $this->base; $this->orig_dn = $this->dn; + $this->orig_cn = $this->cn; } @@ -761,7 +763,20 @@ class aclrole extends acl if(empty($this->cn)){ $message[] = msgPool::required(_("Name")); } - + + $ldap = $this->config->get_ldap_link(); + $ldap->cd($this->config->current['BASE']); + if($this->cn != $this->orig_cn){ + $ldap->search("(&(objectClass=gosaRole)(cn=".$this->cn."))"); + if($ldap->count()) { + while($attrs = $ldap->fetch()){ + if($attrs['dn'] != $this->orig_dn){ + $message[] = msgPool::duplicated(_("Name")); + } + } + } + } + if(!count($this->gosaAclTemplate)){ $message[] = msgPool::required(_("ACL")); }