diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc
index 9159587ac5a6f2ca516b62a921282d70a4ce9128..b1c2c1b2b519ec1cef8151cc422d19733a23ea76 100644 (file)
/* Creat dialog object */
$this->DivListUsers = new divListUsers($this->config,$this);
- /* LOCK MESSAGE Vars */
- $_SESSION['LOCK_VARS_TO_USE'] = array("/^act$/","/^id$/","/^user_edit_/","/^user_del_/");
}
/* Call parent execute */
plugin::execute();
+ /* LOCK MESSAGE Vars */
+ $_SESSION['LOCK_VARS_TO_USE'] = array("/^act$/","/^id$/","/^user_edit_/","/^user_del_/");
+
$smarty = get_smarty(); // Smarty instance
$s_action = ""; // Contains the action to be taken
$s_entry = ""; // The value for s_action
$s_tab= "user";
}
- /* Display the copy & paste dialog, if it is currently open */
- $ret = $this->copyPasteHandling($s_action,$s_entry);
- if($ret){
- return($ret);
+ /* Some may be active but diabled in gosa.conf. */
+ if(!search_config($this->config->data['TABS'], $s_tab , "CLASS")){
+ $s_tab = "user";
}
+ /* Get 'dn' from posted 'uid' */
+ if(in_array_ics($s_action,array("editPaste","cut","copy"))){
+
+ if(isset($this->list[trim($s_entry)]['dn'])){
+ $dn= $this->list[trim($s_entry)]['dn'];
+ }else{
+ $dn = $this->DivListUsers->selectedBase;
+ }
+
+ $acl= get_permissions ($dn, $this->ui->subtreeACL);
+ $acl= get_module_permission($acl, "user", $dn);
+
+ if($acl != "#all#"){
+ print_red (_("You are not allowed to execute this method!"));
+ }else{
+ /* Display the copy & paste dialog, if it is currently open */
+ $ret = $this->copyPasteHandling($s_action,$s_entry);
+ if($ret){
+ return($ret);
+ }
+ }
+ }
+
/********************
Edit existing entry