示例#1
0
 /**
  * Check access permissions
  * @return bool
  */
 private function checkAccess()
 {
     $this->_user =& SPFactory::user();
     /* authorise access permissions */
     if (!$this->_user->can('panel')) {
         Sobi::Error('CoreCtrl', 'UNAUTHORIZED_ACCESS', SPC::ERROR, 403, __LINE__, __FILE__);
         exit;
     }
     /* authorise task permissions */
     if (SPRequest::task()) {
         if (!$this->_user->can(SPRequest::task())) {
             Sobi::Error('CoreCtrl', 'UNAUTHORIZED_ACCESS', SPC::ERROR, 403, __LINE__, __FILE__);
             //				Sobi::Error( 'CoreCtrl', SPLang::e( 'UNAUTHORIZED_ACCESS_TASK', SPRequest::task() ), SPC::ERROR, 403, __LINE__, __FILE__ );
             exit;
         }
     }
 }