From: cajus Date: Tue, 5 Sep 2006 12:27:56 +0000 (+0000) Subject: Added check for printer creation permissions X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=484f20075330784fec6469b7aea8e961b1f3451e;p=gosa.git Added check for printer creation permissions git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@4596 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/systems/class_printGeneric.inc b/plugins/admin/systems/class_printGeneric.inc index 8154a89ac..705302820 100644 --- a/plugins/admin/systems/class_printGeneric.inc +++ b/plugins/admin/systems/class_printGeneric.inc @@ -615,6 +615,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)){