Code

Hide attributes if we have no acls for environment plugin
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Nov 2006 08:35:42 +0000 (08:35 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Thu, 2 Nov 2006 08:35:42 +0000 (08:35 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4987 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/personal/environment/class_environment.inc
plugins/personal/environment/environment.tpl
plugins/personal/environment/main.inc

index 51cda502ce1b6f21b09cc678bd5fb5f8c919cb11..36212289c6e386d85721b11aad4610a2755b91dd 100644 (file)
@@ -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");
+          }
         }
       }
     }
index d5f729b01c9f4a9d78ca2d001aa539e44c514cfc..1dc24115b50d42d75e7b7e8fa758bb70c292fe2c 100644 (file)
@@ -18,8 +18,7 @@
     <tr>
      <td style="vertical-align:top">
 {render acl=$gotoProfileACL}
-      <input class="center" type="checkbox" value="1" {$useProfileCHK} name="useProfile" id="useProfile"
-       onclick="changeState('gotoProfileServer');changeState('gotoProfileFlagC');changeState('gotoProfileQuota');">
+      <input class="center" type="checkbox" value="1" {$useProfileCHK} name="useProfile" id="useProfile" onclick="changeState('gotoProfileServer');changeState('gotoProfileFlagC');changeState('gotoProfileQuota');">
 {/render}
      </td>
      <td style="vertical-align:middle;">
index 06b14f2650485a209e179d8c1eaa83ee8ea4d673..c9662e6bafc565d55e176adc6369cd00955c59d8 100644 (file)
@@ -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');
   }