original_string: protected function check_access($action = null)
  	{
  		is_null($action) and $action = $this->request->action;
  
  		if ($this->has_access($action) === false)
  		{
  			$context = array(
  				'form' => array(
  					'%action%' => $action,
  					'%items%'  => $this->get_name(999),
  				)
  			);
  
  			\Logger::instance('alert')->error(gettext('You are not authorized to %action% %items%.'), $context);
  
  			return \Response::redirect_back(\Uri::admin(false));
  		}
  	}
code: protected function check_access($action = null)
  	{
  		is_null($action) and $action = $this->request->action;
  
  		if ($this->has_access($action) === false)
  		{
  			$context = array(
  				'form' => array(
  					'%action%' => $action,
  					'%items%'  => $this->get_name(999),
  				)
  			);
  
  			\Logger::instance('alert')->error(gettext('You are not authorized to %action% %items%.'), $context);
  
  			return \Response::redirect_back(\Uri::admin(false));
  		}
  	}
code_tokens: protected function check_access ( $ action = null ) { is_null ( $ action ) and $ action = $ this -> request -> action ; if ( $ this -> has_access ( $ action ) === false ) { $ context = array ( 'form' => array ( '%action%' => $ action , '%items%' => $ this -> get_name ( 999 ) , ) ) ; \ Logger :: instance ( 'alert' ) -> error ( gettext ( 'You are not authorized to %action% %items%.' ) , $ context ) ; return \ Response :: redirect_back ( \ Uri :: admin ( false ) ) ; } }
docstring: Checks whether user has access to an action
docstring_tokens: Checks whether user has access to an action