diff --git a/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc b/gosa-plugins/goto/admin/applications/class_applicationGeneric.inc
index 97da83a3cb0b1a173b0226430340216ba9165f5c..820c9cea070004e6ba4dd85cae8e39ce7e1a2e0e 100644 (file)
var $last_sorting= "invalid";
var $applications= array();
+ var $orig_base = "";
+ var $orig_cn = "";
+ var $orig_dn = "";
+
/* attribute list for save action */
var $attributes= array("cn", "description", "gosaApplicationExecute", "gosaApplicationName","gosaApplicationIcon",
"gosaApplicationFlags","gotoLogonScript");
/* Load icon */
$ldap= $config->get_ldap_link();
+ $this->orig_dn = $dn;
if ($dn != 'new'){
$this->iconData= $ldap->get_attribute($dn, "gosaApplicationIcon");
$this->saved_attributes['gosaApplicationIcon'] = $this->iconData;
} else {
$this->base= preg_replace ("/^[^,]+,".get_ou('applicationou')."/", "", $this->dn);
}
+
+ $this->orig_cn = $this->cn;
+ $this->orig_base = $this->base;
}
$message[]= msgPool::duplicated("cn");
}
}
+
+ /* 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;
}