horizon/openstack_dashboard
Vlad Okhrimenko 38dfe3d907 Logout user if he has no valid tokens
Before this patch, if user's rights were changed
or revoked - there would be "Unauthorized" errors
on every page since user had no rights to view them
because he had no valid tokens in that case.

Now user will be logged out if he has no valid tokens.
Set `escalate` to True (for unauthorized-error)
to always log user out.

Also, now horizon.exceptions.NotAuthorized is a part of
UNAUTHORIZED tuple in the exceptions.py, because this type
of exception is re-raised after handling services unauthorized errors.
Looks like it was missing. Now the horizon.exceptions.NotAuthorized
is handled like all NotAuthorized exceptions.

And horizon_middleware.py in process_exception now generates
logout_reason for cases if user is not authorized.

Conflicts:
	openstack_dashboard/dashboards/project/overview/tests.py

Closes-Bug: #1528967
Closes-Bug: #1252341
Closes-Bug: #1407105
Co-Authored-By: Paul Karikh <pkarikh@mirantis.com>
Change-Id: I417cad936ea80c0569c2f442fc87cbd58745757e
(cherry picked from commit 878c703fd0)
2016-04-12 12:32:01 +02:00
..
api Add missing content-length header 2016-03-03 15:46:17 +00:00
conf Add "Preview Stack" action to Stacks table 2015-03-13 15:35:47 +03:00
dashboards Logout user if he has no valid tokens 2016-04-12 12:32:01 +02:00
django_pyscss_fix Workaround for 'File exists' test failure 2014-09-30 06:43:22 -05:00
enabled [Launch Instance Fix] Conditionally enable UI 2015-04-03 16:30:48 -06:00
local Merge "Add missing telemetry policy example file" 2015-04-14 03:50:10 +00:00
locale Import translations from Transifex for Juno 2015-04-24 01:48:16 +00:00
management Detect apache version 2015-04-03 09:51:05 +02:00
openstack Switch from oslo.utils to oslo_utils 2015-01-18 14:23:32 -08:00
static Merge "Backport the WEBROOT fixes for JS and CSS into Kilo" into stable/kilo 2015-12-01 00:41:23 +00:00
templates Backport the WEBROOT fixes for JS and CSS into Kilo 2015-09-10 12:10:28 +00:00
templatetags Replaces always disabled context selection link 2014-10-20 15:50:12 -06:00
test Add missing content-length header 2016-03-03 15:46:17 +00:00
usage Fix _get_tenant_volume_usages 2015-12-04 14:33:49 +01:00
utils Fix date pickers in metering modal 2015-06-26 10:42:07 +02:00
wsgi Update WSGI app creation to be compatible with Django 1.7 2014-10-16 13:57:45 +01:00
__init__.py
context_processors.py Backport the WEBROOT fixes for JS and CSS into Kilo 2015-09-10 12:10:28 +00:00
exceptions.py Revert "Refactoring the exceptions lists" 2015-04-06 16:49:17 -05:00
hooks.py Remove extraneous vim configuration comments 2014-05-06 15:30:10 +08:00
policy.py Moving policy engine implementation 2015-01-22 15:55:19 -07:00
policy_backend.py Moving policy engine implementation 2015-01-22 15:55:19 -07:00
settings.py Backport the WEBROOT fixes for JS and CSS into Kilo 2015-09-10 12:10:28 +00:00
static_settings.py Updated incorrect name for angular lrdragndrop 2015-03-31 10:42:18 +00:00
urls.py Allow specifying authentication URLs from settings 2015-03-18 11:44:30 +11:00
views.py Redirect initial hit to login page 2015-03-13 15:14:23 +11:00