horizon/openstack_dashboard
Vlad Okhrimenko 878c703fd0 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.

Closes-Bug: #1252341
Closes-Bug: #1407105
Co-Authored-By: Paul Karikh <pkarikh@mirantis.com>
Change-Id: I417cad936ea80c0569c2f442fc87cbd58745757e
2015-08-29 04:02:54 +00:00
..
api Merge "py3: Replace unicode with six.text_type" 2015-08-28 02:10:33 +00:00
conf Adding policy check in quota call 2015-06-25 22:04:50 +00:00
contrib Merge "Add Storm Job to UI" 2015-08-28 11:19:40 +00:00
dashboards Logout user if he has no valid tokens 2015-08-29 04:02:54 +00:00
django_pyscss_fix Workaround for 'File exists' test failure 2014-09-30 06:43:22 -05:00
enabled [Sahara] Add support for event logs 2015-08-27 08:33:14 -06:00
local Fix local_settings.py.example to be consistently styled 2015-08-27 15:58:56 -05:00
locale Imported Translations from Transifex 2015-08-27 06:14:25 +00:00
management Detect apache version 2015-04-03 09:51:05 +02:00
static Merge "A few fixes to make the App Catalog plugin work." 2015-08-28 22:51:33 +00:00
templates Revert "Fix broken header dropdowns" 2015-08-26 18:10:21 +00:00
templatetags Horizon Context Selection should be to the right 2015-08-14 10:48:45 -07:00
test Merge "[Sahara] Add support for event logs" 2015-08-28 09:43:58 +00:00
themes Merge "SCSS $webroot should inherit from settings.py" 2015-08-28 09:15:53 +00:00
usage Fix _get_tenant_volume_usages 2015-06-29 21:45:35 +08:00
utils Replace dict.iteritems() with six.iteritems(dict) 2015-07-24 12:20:56 +02:00
wsgi Update WSGI app creation to be compatible with Django 1.7 2014-10-16 13:57:45 +01:00
__init__.py Unifies the project packaging into one set of modules. 2012-02-29 00:20:13 -08:00
.eslintrc Add selective ESLint rule activation for Horizon Legacy JS 2015-07-08 17:06:15 -07:00
context_processors.py Fix bug where WEBROOT is not respected 2015-07-22 04:10:50 +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
karma.conf.js Added karma threshold reporting & failure 2015-08-20 17:07:08 +01:00
policy_backend.py Remove files from oslo-incubator 2015-06-16 01:35:34 +00:00
policy.py Moving policy engine implementation 2015-01-22 15:55:19 -07:00
settings.py Merge "SCSS $webroot should inherit from settings.py" 2015-08-28 09:15:53 +00:00
static_settings.py Dashboard ReOrg - Move APIs into app/core 2015-08-03 14:25:37 -06: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