[icinga-checkins] icinga.org: icinga-web/master: * icinga.user is now required for login

git at icinga.org git at icinga.org
Mon Feb 27 14:19:18 CET 2012


Module: icinga-web
Branch: master
Commit: a65981d61d95aefb69ef1d28ea1a79dc0d41473d
URL:    https://git.icinga.org/?p=icinga-web.git;a=commit;h=a65981d61d95aefb69ef1d28ea1a79dc0d41473d

Author: Jannis Mosshammer <jannis.mosshammer at netways.de>
Date:   Mon Feb 27 14:08:18 2012 +0100

* icinga.user is now required for login

---

 .../AppKit/actions/Login/AjaxLoginAction.class.php |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/app/modules/AppKit/actions/Login/AjaxLoginAction.class.php b/app/modules/AppKit/actions/Login/AjaxLoginAction.class.php
index 3a4d61f..20cfea0 100644
--- a/app/modules/AppKit/actions/Login/AjaxLoginAction.class.php
+++ b/app/modules/AppKit/actions/Login/AjaxLoginAction.class.php
@@ -36,6 +36,10 @@ class AppKit_Login_AjaxLoginAction extends AppKitBaseAction {
 
             try {
                 $user->doLogin($username, $password);
+                if(!$user->hasCredential("icinga.user")) {
+                    $user->doLogout();
+                    $this->setAttribute('authenticated', false);
+                }
                 $this->setAttribute('authenticated', true);
             } catch (AgaviSecurityException $e) {
                 $this->setAttribute('authenticated', false);





More information about the icinga-checkins mailing list