From: cajus Date: Tue, 5 Sep 2006 12:29:01 +0000 (+0000) Subject: Fixed printer permissions X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5e8e21cc2b5614c450cac272a70a1b6e005cdb2e;p=gosa.git Fixed printer permissions git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4597 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index dc4480d6d..db8e40b1f 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -604,6 +604,16 @@ class printgeneric extends plugin if(($this->BelongsTo == "Printer") && (empty($this->cn))){ $message[]= "The required field 'Printer name' is not set."; } + + if($this->BelongsTo == "Printer"){ + $ui= get_userinfo(); + $acl= get_permissions ($dn, $ui->subtreeACL); + $acl= get_module_permission($acl, "printer", $this->dn); + if (chkacl($acl, "create") != ""){ + $message[]= _("You have no permissions to create a printer on this 'Base'."); + } + } + /* must: labeledURI */ if(empty($this->labeledURI)){