Merge "Allow specifying authentication URLs from settings"

This commit is contained in:
Jenkins 2015-03-19 15:55:33 +00:00 committed by Gerrit Code Review
commit 0e7a809d94
4 changed files with 26 additions and 1 deletions

View File

@ -280,6 +280,18 @@ Most of the following settings are defined in
``openstack_dashboard/local/local_settings.py``, which should be copied from
``openstack_dashboard/local/local_settings.py.example``.
``AUTHENTICATION_URLS``
-----------------------
.. versionadded:: 2015.1(Kilo)
Default: ``['openstack_auth.urls']``
A list of modules from which to collate authentication URLs from. The default
option adds URLs from the django-openstack-auth module however others will be
required for additional authentication mechanisms.
``API_RESULT_LIMIT``
--------------------

View File

@ -296,6 +296,13 @@ TIME_ZONE = "UTC"
# the password.
# ENFORCE_PASSWORD_CHECK = False
# Modules that provide /auth routes that can be used to handle different types
# of user authentication. Add auth plugins that require extra route handling to
# this list.
#AUTHENTICATION_URLS = [
# 'openstack_auth.urls',
#]
# The Horizon Policy Enforcement engine uses these values to load per service
# policy rule files. The content of these files should match the files the
# OpenStack services are using to determine role based access control in the

View File

@ -171,6 +171,7 @@ INSTALLED_APPS = [
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
AUTHENTICATION_BACKENDS = ('openstack_auth.backend.KeystoneBackend',)
AUTHENTICATION_URLS = ['openstack_auth.urls']
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
SESSION_ENGINE = 'django.contrib.sessions.backends.signed_cookies'

View File

@ -32,11 +32,16 @@ import horizon
urlpatterns = patterns(
'',
url(r'^$', 'openstack_dashboard.views.splash', name='splash'),
url(r'^auth/', include('openstack_auth.urls')),
url(r'^api/', include('openstack_dashboard.api.rest.urls')),
url(r'', include(horizon.urls)),
)
for u in getattr(settings, 'AUTHENTICATION_URLS', ['openstack_auth.urls']):
urlpatterns += patterns(
'',
url(r'^auth/', include(u))
)
# Development static app and project media serving using the staticfiles app.
urlpatterns += staticfiles_urlpatterns()