present a login page, if anon user has no right for an application, makes more sense then throwing an exception

This commit is contained in:
Ralf Becker 2010-09-17 09:11:44 +00:00
parent ae7158086a
commit dce834b93b

View File

@ -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();