From dce834b93b8901a002d46f28e6cbb833cc13eabe Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 17 Sep 2010 09:11:44 +0000 Subject: [PATCH] present a login page, if anon user has no right for an application, makes more sense then throwing an exception --- phpgwapi/inc/class.egw.inc.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/phpgwapi/inc/class.egw.inc.php b/phpgwapi/inc/class.egw.inc.php index f1dfe6353f..54e0ff9be5 100644 --- a/phpgwapi/inc/class.egw.inc.php +++ b/phpgwapi/inc/class.egw.inc.php @@ -356,6 +356,11 @@ class egw extends egw_minimal if (!$GLOBALS['egw_info']['user']['apps'][$currentapp = $GLOBALS['egw_info']['flags']['currentapp']] || ($GLOBALS['egw_info']['flags']['admin_only'] && !$GLOBALS['egw_info']['user']['apps']['admin'])) { + // present a login page, if anon user has no right for an application + if ($this->session->session_flags == 'A') + { + egw::redirect_link('/logout.php'); + } if ($currentapp == 'admin' || $GLOBALS['egw_info']['flags']['admin_only']) { throw new egw_exception_no_permission_admin();