* @package tao * @license GPLv2 http://www.opensource.org/licenses/gpl-2.0.php */ class tao_actions_Permission extends tao_actions_CommonModule { /** * Access to resource id denied */ public function denied() { $accepts = explode(',', $this->getRequest()->getHeader('Accept')); if (array_search('application/json', $accepts) !== false || array_search('text/javascript', $accepts) !== false) { $this->returnJson([ 'error' => __("You do not have the required rights to edit this resource.")]); return; } return $this->setView('permission/denied.tpl'); } }