Code

Fixed acl handling in user listing.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 May 2008 12:19:35 +0000 (12:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 26 May 2008 12:19:35 +0000 (12:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11002 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/users/class_divListUsers.inc

index a4b208b3a7ae7f778bc50ce250e735aede460264..5414d4254974386ca950c1b5985872ffba7e61b0 100644 (file)
@@ -153,7 +153,6 @@ class divListUsers extends MultiSelectWindow
     }
 
     /* Get copy & paste icon */
-    $acl_all  = $ui->has_complete_category_acls($this->selectedBase,"users") ;
     $acl      = $ui->get_permissions($this->selectedBase,"users/user");
 
     /* Add default header */
@@ -200,20 +199,25 @@ class divListUsers extends MultiSelectWindow
     }
 
     /* Add multiple copy & cut icons */
-    if(is_object($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){
+    $acl_all  = $ui->has_complete_category_acls($this->selectedBase,"users");
+
+    if(is_object($this->parent->CopyPasteHandler) && preg_match("/r/",$acl_all)){
       $s.= "..|---|\n";
       $s.= "..|<img src='images/lists/copy.png' alt='' border='0' class='center'>".
         "&nbsp;"._("Copy")."|"."multiple_copy_systems|\n";
+    }
+    if(is_object($this->parent->CopyPasteHandler) && preg_match("/(r.*d|d.*r)/",$acl_all)){
       $s.= "..|<img src='images/lists/cut.png' alt='' border='0' class='center'>".
         "&nbsp;"._("Cut")."|"."multiple_cut_systems|\n";
-      
-      if($this->parent->CopyPasteHandler->entries_queued()){
-        $img = "<img border='0' class='center' src='images/lists/paste.png' alt=''>";
-        $s.="..|".$img."&nbsp;"._("Paste")."|editPaste|\n";
-      }else{
-        $img = "<img border='0' class='center' src='images/lists/paste.png' alt=''>";
-        $s.="..|".$img."&nbsp;"._("Paste")."\n";
-      }
+    }
+
+    /* Copy & paste icons */
+    if(is_object($this->parent->CopyPasteHandler) && $this->parent->CopyPasteHandler->entries_queued()){
+      $img = "<img border='0' class='center' src='images/lists/paste.png' alt=''>";
+      $s.="..|".$img."&nbsp;"._("Paste")."|editPaste|\n";
+    }else{
+      $img = "<img border='0' class='center' src='images/lists/paste-grey.png' alt=''>";
+      $s.="..|".$img."&nbsp;"._("Paste")."\n";
     }
 
     /* Add snapshot icons */
@@ -302,7 +306,6 @@ class divListUsers extends MultiSelectWindow
       $action= "";
 
       /* Add copy & cut icons */     
-      $acl_all  = $ui->has_complete_category_acls($this->selectedBase,"users") ;
       $acl      = $ui->get_permissions($val['dn'],"users/user");
       if(preg_match("/(r.*d|r.*d)/",$acl) && $this->parent->CopyPasteHandler){
         $action .= "<input class='center' type='image'