summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 10df20d)
raw | patch | inline | side by side (parent: 10df20d)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Jan 2010 08:34:47 +0000 (08:34 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 7 Jan 2010 08:34:47 +0000 (08:34 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15094 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/fai/admin/fai/class_faiManagement.inc | patch | blob | history |
diff --git a/gosa-plugins/fai/admin/fai/class_faiManagement.inc b/gosa-plugins/fai/admin/fai/class_faiManagement.inc
index 8fd3847eb0a6b8efb5a0791972cc0b9a109e62c7..141cff98b6d0da83eaa94a70c822d9138666c576 100644 (file)
function removeFAIObjects($to_delete)
{
// Do not allow to remove objects with state freeezed
- $errors=array();
+ $errors = $disallowed = array();
+
foreach($to_delete as $obj){
- if(isset($obj['FAIstate']) && preg_match('/^freeze/', $obj['FAIstate'])){
+ $type = $this->get_type($obj);
+ $acl = $this->ui->get_permissions($obj['dn'],"fai/".$type[1]);
+ if(!preg_match("/d/",$acl)){
+ $disallowed[] = $obj['dn'];
+ }elseif(isset($obj['FAIstate']) && preg_match('/^freeze/', $obj['FAIstate'])){
$errors[] = $obj['dn'];
}else{
$this->dns[] = $obj['dn'];
msg_dialog::display(_("Branch locked"),
sprintf(_("The following entries are locked, you can't remove them %s."),msgPool::buildList($errors)),INFO_DIALOG);
}
+ if(count($disallowed)){
+ msg_dialog::display(_("Permission error"), msgPool::permDelete($disallowed), ERROR_DIALOG);
+ }
// Check entry locking
if(count($this->dns)){