From: hickert Date: Tue, 27 May 2008 13:33:23 +0000 (+0000) Subject: Fixed copy & paste acls for users. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f3871747ded77f13e2da08e5abe6ed5a3718347b;p=gosa.git Fixed copy & paste acls for users. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11044 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-core/plugins/admin/users/class_divListUsers.inc b/gosa-core/plugins/admin/users/class_divListUsers.inc index e8da8760b..fb29fd472 100644 --- a/gosa-core/plugins/admin/users/class_divListUsers.inc +++ b/gosa-core/plugins/admin/users/class_divListUsers.inc @@ -199,13 +199,10 @@ class divListUsers extends MultiSelectWindow } } - if(is_object($this->parent->CopyPasteHandler) && preg_match("/r/",$acl_all)){ $s.= "..|---|\n"; $s.= "..|". " "._("Copy")."|"."multiple_copy_systems|\n"; - } - if(is_object($this->parent->CopyPasteHandler) && preg_match("/(r.*d|d.*r)/",$acl_all)){ $s.= "..|". " "._("Cut")."|"."multiple_cut_systems|\n"; } diff --git a/gosa-core/plugins/admin/users/class_userManagement.inc b/gosa-core/plugins/admin/users/class_userManagement.inc index d2eecf083..b4dee990b 100644 --- a/gosa-core/plugins/admin/users/class_userManagement.inc +++ b/gosa-core/plugins/admin/users/class_userManagement.inc @@ -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"); } }