From: hickert Date: Thu, 14 Dec 2006 11:32:17 +0000 (+0000) Subject: Gray out environment share if we have insufficient acls X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=11e7b07539dedd6a46919247dcf18e6ebd28aa7a;p=gosa.git Gray out environment share if we have insufficient acls git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@5394 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/personal/environment/class_environment.inc b/plugins/personal/environment/class_environment.inc index 57aa9f139..2f55230ef 100644 --- a/plugins/personal/environment/class_environment.inc +++ b/plugins/personal/environment/class_environment.inc @@ -608,9 +608,17 @@ class environment extends plugin $divlistShares->SetHeight(100); $tmp = $this->printOutAssignedShares(); + foreach($tmp as $key => $value){ $img = ""; + $hide = false; + $background = ""; + if(chkacl($this->acl,"gotoShare") != ""){ + $background = "background: #D0D0D0; "; + $hide = true; + } + /* Check if entry starts with an ! */ if(preg_match("/^!/",$this->gotoShares[$key]['server'])){ @@ -618,12 +626,12 @@ class environment extends plugin if($this->is_group) continue; /* Create pwd reset images */ - if($this->gotoShares[$key]['PwdHash'] != ""){ + if($this->gotoShares[$key]['PwdHash'] != "" && !$hide){ $img.= ""; } - $field1 = array("string" => "".$value."" ); - $field2 = array("string" => $img , "attach" => "style='border-right:0px;'"); + $field1 = array("string" => "".$value."" , "attach" => "style='".$background."'"); + $field2 = array("string" => $img , "attach" => "style='".$background."border-right:0px;'"); }else{ /* Create pwd reset img && delete image */ @@ -632,10 +640,12 @@ class environment extends plugin title='"._("Reset password hash")."'>"; $img.= " "; } + if(!$hide){ $img.= ""; - $field1 = array("string" => $value); - $field2 = array("string" => $img , "attach" => "style='border-right:0px;'"); + } + $field1 = array("string" => $value , "attach" => "style='".$background."'"); + $field2 = array("string" => $img , "attach" => "style='".$background."border-right:0px;'"); } $divlistShares->AddEntry(array($field1,$field2)); }