From: hickert Date: Thu, 19 May 2011 08:22:46 +0000 (+0000) Subject: Updated cfg management X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3700a244ba73eb13f04720d8ac6c924133d7f85d;p=gosa.git Updated cfg management git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20876 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagement.inc index 20cbecf33..7c696be5c 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_ConfigManagement.inc @@ -30,7 +30,7 @@ class ConfigManagement extends plugin function __construct($config, $dn) { $this->config = &$config; - $this->listing = new cfgMgmtMangement($this->config, get_userinfo(), $this); + $this->listing = new cfgMgmtManagement($this->config, get_userinfo(), $this); // Load the template engine and tell her what template // to use for the HTML it produces. @@ -512,7 +512,7 @@ class ConfigManagement extends plugin /*! \brief Acts on open requests. - * (This action is received from the cfgMgmtMangement class.) + * (This action is received from the cfgMgmtManagement class.) * @param Array The items ids. (May contain multiple ids) * @return */ @@ -530,12 +530,22 @@ class ConfigManagement extends plugin */ function removeEntry($ids) { - $this->ids = $ids; - + $this->ids = array(); $names = array(); + $ui = get_userinfo(); foreach($ids as $id){ $item = $this->dataModel->getItemByDn($id); - $names["({$item['type']}) {$item['path']})"] = $item['name']; + $dn = $item['dn']; + $acl = $ui->get_permissions($dn, "ConfigManagement/ConfigManagement", "cfgItem"); + + // Check permissions, are we allowed to remove this object? + if(preg_match("/d/",$acl)){ + $names["({$item['type']}) {$item['path']})"] = $item['name']; + $this->ids[] = $id; + } else { + msg_dialog::display(_("Permission error"), msgPool::permDelete(), ERROR_DIALOG); + new log("security","ConfigManagement/".get_class($this),$dn,array(),"Tried to trick deletion."); + } } $smarty = get_smarty(); diff --git a/gosa-plugins/goto-ng/admin/newConfigManagement/class_cfgMgmtMangement.inc b/gosa-plugins/goto-ng/admin/newConfigManagement/class_cfgMgmtMangement.inc index 3ea534deb..2c4b523f7 100644 --- a/gosa-plugins/goto-ng/admin/newConfigManagement/class_cfgMgmtMangement.inc +++ b/gosa-plugins/goto-ng/admin/newConfigManagement/class_cfgMgmtMangement.inc @@ -1,6 +1,6 @@