Code

Fixed printer permissions
authorcajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Sep 2006 12:29:01 +0000 (12:29 +0000)
committercajus <cajus@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Sep 2006 12:29:01 +0000 (12:29 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4597 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/systems/class_printGeneric.inc

index dc4480d6d676b59ed3da797a474a81bb77905b7e..db8e40b1fe225aba6c6a6b9bd58b5405e1e77005 100644 (file)
@@ -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)){