public function checkPerm() { $db = ezcDbInstance::get(); $act = $this->act == 'list' ? 'SHOW' : strToUpper($this->act); $name = strToUpper($this->baseName); if (!$this->auth->hasPerm($act, $name)) { die(sprintf(_("PERMISSION DENIED [%s/%s]"), $act, $name)); } if ($this->act == 'add') { R3Security::checkGlobalEntry($this->ge_id); } else { // Can edit/delete the given id if (!in_array($this->method, array('getEnergySource', 'getEnergyUDM'))) { R3Security::checkGlobalSubcategory($this->id); } } }