Code

Fixed copy & paste acls for users.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 May 2008 13:33:23 +0000 (13:33 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 27 May 2008 13:33:23 +0000 (13:33 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11044 594d385d-05f5-0310-b6e9-bd551577e9d8

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

index e8da8760bf57775ac86ecb1d9705611a77625c31..fb29fd472c7f51706aba17308a2f6bb8022a82d9 100644 (file)
@@ -199,13 +199,10 @@ class divListUsers extends MultiSelectWindow
       }
     }
 
-
     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";
     }
index d2eecf083f1fed1232b7e0df7ae0142781c88fe3..b4dee990b86d7c9c37cf3fdb63b7e40afd4cd7ef 100644 (file)
@@ -1107,13 +1107,21 @@ class userManagement extends plugin
     if(!is_object($this->CopyPasteHandler)){
       return("");
     }
-
+    
+    $ui = get_userinfo();
+  
     /* Add a single entry to queue */
     if($s_action == "cut" || $s_action == "copy"){
+
       /* Cleanup object queue */
       $this->CopyPasteHandler->cleanup_queue();
       $dn = $this->list[$s_entry]['dn'];
-      $this->CopyPasteHandler->add_to_queue($dn,$s_action,"usertabs","USERTABS","users");
+      if($s_action == "copy" && preg_match("/r/",$ui->has_complete_category_acls($dn,"users"))){
+        $this->CopyPasteHandler->add_to_queue($dn,$s_action,"usertabs","USERTABS","users");
+      }
+      if($s_action == "cut" && preg_match("/(r.*d|d.*r)/",$ui->has_complete_category_acls($dn,"users"))){
+        $this->CopyPasteHandler->add_to_queue($dn,$s_action,"usertabs","USERTABS","users");
+      }
     }
 
     /* Add entries to queue */
@@ -1126,10 +1134,10 @@ class userManagement extends plugin
       foreach($this->list_get_selected_items() as $id){
         $dn = $this->list[$id]['dn'];
 
-        if($s_action == "copy_multiple"){
+        if($s_action == "copy_multiple" && preg_match("/r/",$ui->has_complete_category_acls($dn,"users"))){
           $this->CopyPasteHandler->add_to_queue($dn,"copy","usertabs","USERTABS","users");
         }
-        if($s_action == "cut_multiple"){
+        if($s_action == "cut_multiple" && preg_match("/(r.*d|d.*r)/",$ui->has_complete_category_acls($dn,"users"))){
           $this->CopyPasteHandler->add_to_queue($dn,"cut","usertabs","USERTABS","users");
         }
       }