From d672c0ba2794dd4621d17754d0afcb477d09f02c Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 2 Nov 2006 08:35:42 +0000 Subject: [PATCH] Hide attributes if we have no acls for environment plugin git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4987 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../environment/class_environment.inc | 30 ++++++++++++------- plugins/personal/environment/environment.tpl | 3 +- plugins/personal/environment/main.inc | 2 +- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 51cda502c..36212289c 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -629,8 +629,14 @@ class environment extends plugin } $divlistShares = new divSelectBox("gotoShares"); $divlistShares->SetHeight(100); - $tmp = $this->printOutAssignedShares(); + + $tmp = array(); + if($this->acl_is_readable("gotoShares")){ + $tmp = $this->printOutAssignedShares(); + } + + foreach($tmp as $key => $value){ $img = ""; @@ -1204,15 +1210,19 @@ class environment extends plugin function printOutPrinterDevices() { $a_return = array(); - if(is_array($this->gotoPrinter)){ - foreach($this->gotoPrinter as $printer){ - if($printer['mode'] == "admin"){ - $a_return[$printer['cn'][0]]= $printer['cn'][0]." - "._("Administrator"); - }else{ - $a_return[$printer['cn'][0]]= $printer['cn'][0]; - } - if ($printer['cn'][0] == $this->gosaDefaultPrinter){ - $a_return[$printer['cn'][0]].=" - "._("Default printer"); + + if($this->acl_is_readable("gotoPrinter")){ + + if(is_array($this->gotoPrinter)){ + foreach($this->gotoPrinter as $printer){ + if($printer['mode'] == "admin"){ + $a_return[$printer['cn'][0]]= $printer['cn'][0]." - "._("Administrator"); + }else{ + $a_return[$printer['cn'][0]]= $printer['cn'][0]; + } + if ($printer['cn'][0] == $this->gosaDefaultPrinter){ + $a_return[$printer['cn'][0]].=" - "._("Default printer"); + } } } } diff --git a/plugins/personal/environment/environment.tpl b/plugins/personal/environment/environment.tpl index d5f729b01..1dc24115b 100644 --- a/plugins/personal/environment/environment.tpl +++ b/plugins/personal/environment/environment.tpl @@ -18,8 +18,7 @@ {render acl=$gotoProfileACL} - + {/render} diff --git a/plugins/personal/environment/main.inc b/plugins/personal/environment/main.inc index 06b14f265..c9662e6ba 100644 --- a/plugins/personal/environment/main.inc +++ b/plugins/personal/environment/main.inc @@ -22,7 +22,7 @@ if (!$remove_lock){ /* Reset requested? */ if (isset($_POST['edit_cancel']) || (isset($_GET['reset']) && $_GET['reset'] == 1)){ - del_lock ($ui->dn); +# del_lock ($ui->dn); sess_del ('edit'); sess_del ('environment'); } -- 2.30.2