X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Fplugins%2Fadmin%2Facl%2Fclass_aclRole.inc;h=2f90c41900d5a5467948e1659901ff33d8cb1757;hb=e1b170490c61df9cdc32629e6dfcd2c59946337a;hp=45462de8f4848472b09a798c67d6d3bdce9a9511;hpb=fd450a2cdb42590454fa0feebf2691cebbc2829f;p=gosa.git
diff --git a/gosa-core/plugins/admin/acl/class_aclRole.inc b/gosa-core/plugins/admin/acl/class_aclRole.inc
index 45462de8f..2f90c4190 100644
--- a/gosa-core/plugins/admin/acl/class_aclRole.inc
+++ b/gosa-core/plugins/admin/acl/class_aclRole.inc
@@ -51,6 +51,7 @@ class aclrole extends acl
var $cn = "";
var $description = "";
var $orig_dn;
+ var $orig_base;
var $base ="";
function aclrole (&$config, $dn= NULL)
@@ -136,6 +137,8 @@ class aclrole extends acl
/* Finally - we want to get saved... */
$this->is_account= TRUE;
+ $this->orig_base = $this->base;
+ $this->orig_dn = $this->dn;
}
@@ -355,10 +358,10 @@ class aclrole extends acl
foreach ($this->gosaAclTemplate as $key => $entry){
$field1= array("string" => $this->aclTypes[$entry['type']], "attach" => "style='width:100px'");
$field2= array("string" => $this->assembleAclSummary($entry));
- $action= "";
- $action.= "";
- $action.= "";
- $action.= "";
+ $action= "";
+ $action.= "";
+ $action.= "";
+ $action.= "";
$field3= array("string" => $action, "attach" => "style='border-right:0px;width:50px;text-align:right;'");
$aclList->AddEntry(array($field1, $field2, $field3));
@@ -402,8 +405,8 @@ class aclrole extends acl
$field1= array("string" => $dsc, "attach" => "style='width:140px'");
$field2= array("string" => $summary);
- $action= "";
- $action.= "";
+ $action= "";
+ $action.= "";
$field3= array("string" => $action, "attach" => "style='border-right:0px;width:50px'");
$aclList->AddEntry(array($field1, $field2, $field3));
}
@@ -706,6 +709,29 @@ class aclrole extends acl
));
}
+ function check()
+ {
+ $message = plugin::check();
+
+ if(empty($this->cn)){
+ $message[] = msgPool::required(_("Name"));
+ }
+
+ if(!count($this->gosaAclTemplate)){
+ $message[] = msgPool::required(_("ACL"));
+ }
+
+ /* Check if we are allowed to create or move this object
+ */
+ if($this->orig_dn == "new" && !$this->acl_is_createable($this->base)){
+ $message[] = msgPool::permCreate();
+ }elseif($this->orig_dn != "new" && $this->base != $this->orig_base && !$this->acl_is_moveable($this->base)){
+ $message[] = msgPool::permMove();
+ }
+
+ return($message);
+ }
+
}
// vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler: