Fix brain-o--we may not need project_ref, but we do need to create the project!

Change-Id: Iba074fc05fbc150de2ffe813f49d3721aea4bcf5
This commit is contained in:
Kevin L. Mitchell 2011-08-04 10:51:05 -05:00
parent 5997d94329
commit c05a757524
1 changed files with 4 additions and 0 deletions

View File

@ -71,6 +71,10 @@ class KeystoneAuthShim(wsgi.Middleware):
# create a project for tenant
project_id = req.headers['X_TENANT']
try:
self.auth.get_project(project_id)
except:
self.auth.create_project(project_id, user_id)
# ensure user is a member of project
if not self.auth.is_project_member(user_id, project_id):