public function denied() {
        $accepts = explode(',', $this->getRequest()->getHeader('Accept'));
        if(array_search('application/json', $accepts) !== false ||  array_search('text/javascript', $accepts) !== false){

            $this->returnJson(array( 'error' =>  __("You do not have the required rights to edit this resource.")));
            return;
        }
        return $this->setView('permission/denied.tpl');
    }
public function denied() {
        $accepts = explode(',', $this->getRequest()->getHeader('Accept'));
        if(array_search('application/json', $accepts) !== false ||  array_search('text/javascript', $accepts) !== false){

            $this->returnJson(array( 'error' =>  __("You do not have the required rights to edit this resource.")));
            return;
        }
        return $this->setView('permission/denied.tpl');
    }
public function denied ( ) { $ accepts = explode ( ',' , $ this -> getRequest ( ) -> getHeader ( 'Accept' ) ) ; if ( array_search ( 'application/json' , $ accepts ) !== false || array_search ( 'text/javascript' , $ accepts ) !== false ) { $ this -> returnJson ( array ( 'error' => __ ( "You do not have the required rights to edit this resource." ) ) ) ; return ; } return $ this -> setView ( 'permission/denied.tpl' ) ; }
Access to resource id denied
Access to resource id denied