summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 22037c0)
raw | patch | inline | side by side (parent: 22037c0)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 May 2008 13:45:11 +0000 (13:45 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 27 May 2008 13:45:11 +0000 (13:45 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11047 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/plugins/admin/ogroups/class_divListOGroup.inc | patch | blob | history | |
gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc | patch | blob | history |
diff --git a/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc b/gosa-core/plugins/admin/ogroups/class_divListOGroup.inc
index 7ffedd183e07aaac773488f5216032e24ac1b162..e13efd64b524cf1068432a0492e269ee5f48b2f8 100644 (file)
$s.= "..|---|\n";
$s.= "..|<img src='images/lists/copy.png' alt='' border='0' class='center'>".
" "._("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'>".
- " "._("Cut")."|"."multiple_cut_systems|\n";
- }
+ $s.= "..|<img src='images/lists/cut.png' alt='' border='0' class='center'>".
+ " "._("Cut")."|"."multiple_cut_systems|\n";
}
/* Copy & paste icons */
diff --git a/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc b/gosa-core/plugins/admin/ogroups/class_ogroupManagement.inc
index 2add7e445c2c392a5ca463607501cdc3937540d4..6fd1cb24754c7e8b52d97c66df06b582115768b4 100644 (file)
if(count($ids)){
$this->dns = array();
+ $disallowed = array();
foreach($ids as $id){
- $this->dns[$id] = $this->ogrouplist[$id]['dn'];
+ $dn = $this->ogrouplist[$id]['dn'];
+ $acl = $this->ui->get_permissions($dn, "users/user");
+ if(preg_match("/d/",$acl)){
+ $this->dns[$id] = $dn;
+ }else{
+ $disallowed[] = $dn;
+ }
}
- /* Check locks */
- if ($user= get_multiple_locks($this->dns)){
- return(gen_locked_message($user,$this->dns));
+ if(count($disallowed)){
+ msg_dialog::display(_("Permission"),msgPool::permDelete($disallowed),INFO_DIALOG);
}
- $dns_names = array();
- foreach($this->dns as $dn){
- $dns_names[] = @LDAP::fix($dn);
- }
+ if(count($this->dns)){
- add_lock ($this->dns, $this->ui->dn);
+ /* Check locks */
+ if ($user= get_multiple_locks($this->dns)){
+ return(gen_locked_message($user,$this->dns));
+ }
- /* Lock the current entry, so nobody will edit it during deletion */
- $smarty->assign("info", msgPool::deleteInfo($dns_names,_("object group")));
- $smarty->assign("multiple", true);
- return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
+ $dns_names = array();
+ foreach($this->dns as $dn){
+ $dns_names[] = @LDAP::fix($dn);
+ }
+
+ add_lock ($this->dns, $this->ui->dn);
+
+ /* Lock the current entry, so nobody will edit it during deletion */
+ $smarty->assign("info", msgPool::deleteInfo($dns_names,_("object group")));
+ $smarty->assign("multiple", true);
+ return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
+ }
}
}
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->ogrouplist[$s_entry]['dn'];
- $this->CopyPasteHandler->add_to_queue($dn,$s_action,"ogrouptabs","OGROUPTABS","ogroups");
+ if($s_action == "copy" && preg_match("/r/",$ui->has_complete_category_acls($dn,"ogroups"))){
+ $this->CopyPasteHandler->add_to_queue($dn,$s_action, "ogrouptabs","OGROUPTABS","ogroups");
+ }
+ if($s_action == "cut" && preg_match("/(r.*d|d.*r)/",$ui->has_complete_category_acls($dn,"ogroups"))){
+ $this->CopyPasteHandler->add_to_queue($dn,$s_action,"ogrouptabs","OGROUPTABS","ogroups");
+ }
}
foreach($this->list_get_selected_items() as $id){
$dn = $this->ogrouplist[$id]['dn'];
- if($s_action == "copy_multiple"){
+ if($s_action == "copy_multiple" && preg_match("/r/",$ui->has_complete_category_acls($dn,"ogroups"))){
$this->CopyPasteHandler->add_to_queue($dn,"copy","ogrouptabs","OGROUPTABS","ogroups");
}
- if($s_action == "cut_multiple"){
+ if($s_action == "cut_multiple" && preg_match("/(r.*d|d.*r)/",$ui->has_complete_category_acls($dn,"ogroups"))){
$this->CopyPasteHandler->add_to_queue($dn,"cut","ogrouptabs","OGROUPTABS","ogroups");
}
}