summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 335428f)
raw | patch | inline | side by side (parent: 335428f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Jan 2007 03:39:03 +0000 (03:39 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 11 Jan 2007 03:39:03 +0000 (03:39 +0000) |
Skip Copy&Paste if acl != "#all#"
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5518 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5518 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/users/class_divListUsers.inc | patch | blob | history | |
plugins/admin/users/class_userManagement.inc | patch | blob | history |
diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc
index 3182de79165aab7774ddbb9214b8ffe2b90c81c8..f35e099dc72ed862f5a67f2926201bb1f82a9c38 100644 (file)
$tplimg = "<img class='center' src='images/select_template.png' alt='Template' title='%s'>";
$editlink = "<a href='?plug=".validate($_GET['plug'])."&id=%s&act=edit_entry'>%s</a>";
- /* Create action icons */
- $action = "";
- if($this->parent->CopyPasteHandler){
- $action .= "<input class='center' type='image'
- src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
- $action.= "<input class='center' type='image'
- src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
- }
- $action.= "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'
- name='user_edit_%KEY%' title='"._("Edit user")."'>";
- $action.= "<input class='center' type='image' src='images/list_password.png' alt='"._("password")."'
- name='user_chgpw_%KEY%' title='"._("Change password")."'>";
- $action.= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."'
- name='user_del_%KEY%' title='"._("Delete user")."'>";
-
/* Possilbe objectClass image combinations */
$possibleAccounts = array(
"posixAccount" => array("VAR"=>"posix" ,"IMG"=>"posiximg"),
// Test Every Entry and generate divlist Array
foreach($list as $key => $val){
+ /* Create action icons */
+ $action = "";
+
+ $dn= $val['dn'];
+ $acl= get_permissions ($dn, $this->ui->subtreeACL);
+ $acl= get_module_permission($acl, "user", $dn);
+
+ /* Append copy&paste icons if allowed */
+ if($acl == "#all#" && $this->parent->CopyPasteHandler){
+ $action .= "<input class='center' type='image'
+ src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
+ $action.= "<input class='center' type='image'
+ src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
+ }
+
+ /* Add edit icon */
+ $action.= "<input class='center' type='image' src='images/edit.png' alt='"._("edit")."'
+ name='user_edit_%KEY%' title='"._("Edit user")."'>";
+
+ /* Add passowrd change icon if allowed */
+ if (chkacl($acl, "password") == ""){
+ $action.= "<input class='center' type='image' src='images/list_password.png' alt='"._("password")."'
+ name='user_chgpw_%KEY%' title='"._("Change password")."'>";
+ }
+
+ /* Add delete icon if delete user is allowed */
+ if (chkacl($acl, "delete") == ""){
+ $action.= "<input class='center' type='image' src='images/edittrash.png' alt='"._("delete")."'
+ name='user_del_%KEY%' title='"._("Delete user")."'>";
+ }
+
/* Create phonaccopunt informationm, if conencted && is phoneAccount */
if((in_array("goFonAccount" ,$val['objectClass']))){
diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc
index f76950cf48c9c5b8a0d8c169066c752f702792bd..a7034846f8a1dce02c449f4be2914623982e0e87 100644 (file)
$s_tab = "user";
}
- /* Display the copy & paste dialog, if it is currently open */
- $ret = $this->copyPasteHandling($s_action,$s_entry);
- if($ret){
- return($ret);
+ /* Get 'dn' from posted 'uid' */
+ if(in_array_ics($s_action,array("editPaste","cut","copy"))){
+ $dn= $this->list[trim($s_entry)]['dn'];
+ $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