summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0205663)
raw | patch | inline | side by side (parent: 0205663)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 18 Sep 2006 05:02:40 +0000 (05:02 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Mon, 18 Sep 2006 05:02:40 +0000 (05:02 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4699 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/systems/class_printGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc
index 947c778201c42105379d63306ffede234ee70b77..2b9fa073e76e425780c6762db8e5f4043d9f5a83 100644 (file)
/* 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'));
}
/* 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? */
}
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)){
}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
*/