Example #1
0
 /**
  * 检查用户身份授权,如果没有授权,跳转到403页面
  * @return void
  */
 protected function _isAuth()
 {
     if (!$this->_validAuth) {
         return;
     }
     if (!$this->_validLogin) {
         return;
     }
     $authoriz = Identity::getAuthoriz();
     if ($authoriz->isAllowed(APP_NAME, Mvc::$module, Mvc::$controller, $this->_power)) {
         return;
     }
     $this->display(array('err_no' => ErrorNo::ERROR_NO_POWER, 'err_msg' => libapp\Lang::_('ERROR_MSG_ERROR_NO_POWER')));
 }
Example #2
0
 /**
  * 检查用户身份授权,如果没有授权,跳转到403页面
  * @return void
  */
 protected function _isAuth()
 {
     if (!$this->_validAuth) {
         return;
     }
     if (!$this->_validLogin) {
         return;
     }
     $authoriz = Identity::getAuthoriz();
     if ($authoriz->isAllowed(APP_NAME, Mvc::$module, Mvc::$controller, $this->_power)) {
         return;
     }
     $this->err403();
 }