Exemple #1
0
 /** @return AdminAuthManager */
 public static function getInstance()
 {
     if (self::$instance == NULL) {
         self::$instance = new AdminAuthManager();
     }
     return self::$instance;
 }
Exemple #2
0
 protected function doProcess(PageContext $ctxt, RequestArrayAdapter $requestParams, ArrayAdapter $buildParams)
 {
     $this->authed = AuthManager::isAuthorizedAsAdmin();
     if ($this->authed) {
         $this->adminPage = AdminPagesManager::getInstance()->getCurrentPage();
     } else {
         if (FORM_AdminLoginForm::getInstance()->isValid4Process()) {
             if (AdminAuthManager::getInstance()->login()) {
                 WebPages::reloadCurPage();
             }
         }
     }
 }
Exemple #3
0
 protected function doProcess(PageContext $ctxt, RequestArrayAdapter $requestParams, ArrayAdapter $buildParams)
 {
     $this->authed = AuthManager::isAuthorizedAsAdmin();
     if ($this->authed) {
         $this->adminPage = AdminPagesManager::getInstance()->getCurrentPage();
     } else {
         //Показываем форму авторизации админа только если используем базовый провайдер безопасности
         if (PsSecurity::isBasic() && FORM_AdminLoginForm::getInstance()->isValid4Process()) {
             if (AdminAuthManager::getInstance()->login()) {
                 PsUtil::redirectToSelf();
             }
         }
     }
 }