summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6d5014f)
raw | patch | inline | side by side (parent: 6d5014f)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 28 May 2008 05:50:28 +0000 (05:50 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 28 May 2008 05:50:28 +0000 (05:50 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11050 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc | patch | blob | history | |
gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc | patch | blob | history |
diff --git a/gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc b/gosa-plugins/goto/admin/mimetypes/class_divListMimeTypes.inc
index 53872dabb41229b99905a76ed2cecad135782681..e4962746b80cdf3a857af877c2ffe6ef55f71a77 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-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc
index debe254ddf49d02241bce4327c278e5e2880de6b..c56b3d2b4e568d8ff107f23f3f66d9e990c8ca8a 100644 (file)
$this->dns = array();
if(count($ids)){
+ $disallowed = array();
foreach($ids as $id){
- $this->dns[$id] = $this->mimetypes[$id]['dn'];
+ $dn = $this->mimetypes[$id]['dn'];
+ $acl = $this->ui->get_permissions($dn, "mimetypes/mimetype");
+ 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)){
+
+ /* Check locks */
+ if ($user= get_multiple_locks($this->dns)){
+ return(gen_locked_message($user,$this->dns));
+ }
- add_lock ($this->dns, $this->ui->dn);
+ $dns_names = array();
+ foreach($this->dns as $dn){
+ $dns_names[] = @LDAP::fix($dn);
+ }
- /* Lock the current entry, so nobody will edit it during deletion */
- $smarty->assign("info", msgPool::deleteInfo($dns_names,_("Mime type")));
- $smarty->assign("multiple", true);
- return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
+ 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,_("Mime type")));
+ $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->mimetypes[$s_entry]['dn'];
- $this->CopyPasteHandler->add_to_queue($dn,$s_action,"mimetabs","MIMETABS","mimetypes");
+ if($s_action == "copy" && preg_match("/r/",$ui->has_complete_category_acls($dn,"mimetypes"))){
+ $this->CopyPasteHandler->add_to_queue($dn,$s_action,"mimetabs","MIMETABS","mimetypes");
+ }
+ if($s_action == "cut" && preg_match("/(r.*d|d.*r)/",$ui->has_complete_category_acls($dn,"mimetypes"))){
+ $this->CopyPasteHandler->add_to_queue($dn,$s_action,"mimetabs","MIMETABS","mimetypes");
+ }
}
-
/* Add entries to queue */
if($s_action == "copy_multiple" || $s_action == "cut_multiple"){
foreach($this->list_get_selected_items() as $id){
$dn = $this->mimetypes[$id]['dn'];
- if($s_action == "copy_multiple"){
+ if($s_action == "copy_multiple" && preg_match("/r/",$ui->has_complete_category_acls($dn,"mimetypes"))){
$this->CopyPasteHandler->add_to_queue($dn,"copy","mimetabs","MIMETABS","mimetypes");
}
- if($s_action == "cut_multiple"){
+ if($s_action == "cut_multiple" && preg_match("/(r.*d|d.*r)/",$ui->has_complete_category_acls($dn,"mimetypes"))){
$this->CopyPasteHandler->add_to_queue($dn,"cut","mimetabs","MIMETABS","mimetypes");
}
}