From: hickert Date: Mon, 18 Sep 2006 05:02:40 +0000 (+0000) Subject: Acl update X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=03931a70b0d04fe9e633a989f40feb42c8d6c8e2;p=gosa.git Acl update git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4699 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 947c77820..2b9fa073e 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -211,7 +211,6 @@ class printgeneric extends plugin /* Detect if this is a valid printer account; */ - //FIXME: do we need to do this? we've already everything we need in $this->attrs... $ldap = $this->config->get_ldap_link(); $ldap->cat($this->dn, array('objectClass')); @@ -288,9 +287,12 @@ class printgeneric extends plugin } /* Do we need to flip is_account state? */ - if (isset($_POST['modify_state'])){ - $this->is_modified = true; - $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 printer? */ @@ -632,11 +634,10 @@ class printgeneric extends plugin } if($this->BelongsTo == "Printer"){ - if($this->acl_is_createable()){ - $message[]= _("You have no permissions to create a printer on this 'Base'."); + if ($this->orig_dn == "new" && !$this->acl_is_createable()){ + $message[]= _("You have no permissions to create a group on this 'Base'."); } } - /* must: labeledURI */ if(empty($this->labeledURI)){ @@ -720,8 +721,13 @@ class printgeneric extends plugin }else{ $method="http://"; } - - $this->attrs['gotoPrinterPPD'] = $method.str_replace("//","/",$_SERVER['SERVER_NAME']."/ppd/".$this->gotoPrinterPPD); + + /* If no ppd is selected, remove this attribute */ + if(count($this->gotoPrinterPPD)) { + $this->attrs['gotoPrinterPPD'] = $method.str_replace("//","/",$_SERVER['SERVER_NAME']."/ppd/".$this->gotoPrinterPPD); + }else{ + $this->attrs['gotoPrinterPPD'] = array(); + } /* Append printer user */