From f14743270207c750fb050837b87bcbc8ea08bbcf Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 28 Aug 2006 10:15:44 +0000 Subject: [PATCH] Added als to user list icons. (edit,delete,copy,cut) git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4524 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/class_MultiSelectWindow.inc | 2 +- plugins/admin/users/class_divListUsers.inc | 49 +++++++++++++++++----- 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/include/class_MultiSelectWindow.inc b/include/class_MultiSelectWindow.inc index 60b11f168..bbba65eee 100644 --- a/include/class_MultiSelectWindow.inc +++ b/include/class_MultiSelectWindow.inc @@ -507,7 +507,7 @@ class MultiSelectWindow{ $str = " "; } - $str .= " "; +# $str .= " "; } return($str); } diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc index d239375b8..e06517ca3 100644 --- a/plugins/admin/users/class_divListUsers.inc +++ b/plugins/admin/users/class_divListUsers.inc @@ -104,7 +104,7 @@ class divListUsers extends MultiSelectWindow } /* Get copy & paste icon */ - if($this->parent->CopyPasteHandler){ + if(preg_match("/w/",$ui->get_permissions($this->selectedBase,"users/user")) && $this->parent->CopyPasteHandler){ $Copy_Paste = $this->parent->CopyPasteHandler->generatePasteIcon(); }else{ $Copy_Paste =""; @@ -122,12 +122,18 @@ class divListUsers extends MultiSelectWindow title='"._("Reload list")."' name='submit_department' alt='"._("Submit")."'> ". " - "; $listhead .= $this->get_snapshot_header($this->selectedBase); - $listhead .= "  ". - "  ". + + $acls = $ui->get_permissions($this->selectedBase,"users/user"); + if(preg_match("/c/",$acls)) { + $listhead .= "  "; + $listhead .= "  "; +# $listhead .= " - "; + } + + $listhead .= $Copy_Paste. - " - ". _("Base")." ". "  ". @@ -223,25 +229,46 @@ class divListUsers extends MultiSelectWindow Append entries to divlist ********************/ + $ui = get_userinfo(); + // Test Every Entry and generate divlist Array foreach($list as $key => $val){ /* Create action icons */ $action= ""; - if($this->parent->CopyPasteHandler){ + + /* Add copy & cut icons */ + if($this->parent->CopyPasteHandler && preg_match("/w/",$ui->get_category_permissions($val['dn'],"users"))) { $action .= " "; $action.= " "; } + + /* Generate edit icon */ $action.= ""; - $action.= ""; + + /* Add Password change icon, if we are able to write users/password */ + if(preg_match("/w/",$ui->get_permissions($val['dn'],"users/password"))) { + $action.= ""; + }else{ + $action.= " "; + } + + /* Add snapshot icon */ $action.= $this->GetSnapShotActions($val['dn']); - $action.= ""; + /* Add remove icon, if we are allowed to remove the current user */ + if(preg_match("/d/",$ui->get_permissions($val['dn'],"users/user"))) { + $action.= ""; + }else{ + $action.= " "; + } /* Create phonaccopunt informationm, if conencted && is phoneAccount */ $connected = ""; // This string represents timestamp or offline status -- 2.30.2