X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fusers%2Fclass_userManagement.inc;h=b1c2c1b2b519ec1cef8151cc422d19733a23ea76;hb=32e8775e7e268170aafa198c43191c495a85156d;hp=71ce462ebfb43949331713dc04a4c7953a6426b7;hpb=34b8bdb27aed5c5857e3878d3e40924faa9b51fd;p=gosa.git diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc index 71ce462eb..b1c2c1b2b 100644 --- a/plugins/admin/users/class_userManagement.inc +++ b/plugins/admin/users/class_userManagement.inc @@ -52,8 +52,6 @@ class userManagement extends plugin /* 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_/"); } @@ -62,6 +60,9 @@ class userManagement extends plugin /* 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 @@ -104,12 +105,34 @@ class userManagement extends plugin $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 @@ -757,6 +780,9 @@ class userManagement extends plugin /* Use the last dn to search for it's ID in the newly generated list. */ $dn= $this->CopyPasteHandler->lastdn; + + /* Get new user list */ + $this->reload(); foreach($this->list as $id => $entry){ if($entry['dn'] == $dn){ $s_entry= $id;