diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-12-01 14:50:30 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-12-01 14:50:30 +0000 |
commit | 05962b1c445c7b767380918c95d3ce5a2ff85657 (patch) | |
tree | 9fe5938c7d513164c26103542e8f9e5b801f2d34 | |
parent | 40312593498418bea0a5eb165b2c0913a3183279 (diff) | |
parent | 11a7d124ab148b6d4c418b87ae61548de22cd422 (diff) | |
download | django_openstack_auth-05962b1c445c7b767380918c95d3ce5a2ff85657.tar.gz |
Merge "Use unscoped token for scoping to project" into stable/kilo1.2.1
-rw-r--r-- | openstack_auth/backend.py | 8 | ||||
-rw-r--r-- | openstack_auth/plugin/password.py | 3 | ||||
-rw-r--r-- | openstack_auth/tests/tests.py | 3 |
3 files changed, 7 insertions, 7 deletions
diff --git a/openstack_auth/backend.py b/openstack_auth/backend.py index 46c32d4..3859638 100644 --- a/openstack_auth/backend.py +++ b/openstack_auth/backend.py @@ -138,11 +138,9 @@ class KeystoneBackend(object): request = kwargs.get('request') if request: - # Check if token is automatically scoped to default_project - # grab the project from this token, to use as a default - # if no recent_project is found in the cookie - recent_project = request.COOKIES.get('recent_project', - unscoped_auth_ref.project_id) + # Grab recent_project found in the cookie, try to scope + # to the last project used. + recent_project = request.COOKIES.get('recent_project') # if a most recent project was found, try using it first if recent_project: diff --git a/openstack_auth/plugin/password.py b/openstack_auth/plugin/password.py index 484adc2..4143f25 100644 --- a/openstack_auth/plugin/password.py +++ b/openstack_auth/plugin/password.py @@ -42,7 +42,8 @@ class PasswordPlugin(base.BasePlugin): return v3_auth.Password(auth_url=auth_url, username=username, password=password, - user_domain_name=user_domain_name) + user_domain_name=user_domain_name, + unscoped=True) else: return v2_auth.Password(auth_url=auth_url, diff --git a/openstack_auth/tests/tests.py b/openstack_auth/tests/tests.py index 09bdc76..467f814 100644 --- a/openstack_auth/tests/tests.py +++ b/openstack_auth/tests/tests.py @@ -496,7 +496,8 @@ class OpenStackAuthTestsV3(OpenStackAuthTestsMixin, test.TestCase): return auth_v3.Password(auth_url=url, password=password, username=username, - user_domain_name=DEFAULT_DOMAIN) + user_domain_name=DEFAULT_DOMAIN, + unscoped=True) def _create_token_auth(self, project_id, token=None, url=None): if not token: |