Get the base image stuff working. Checkpoint before fixing the tests.
This commit is contained in:
parent
5742e6ea4e
commit
b619356907
120 changed files with 305 additions and 261 deletions
|
@ -33,6 +33,11 @@ def generate_headers(role='read'):
|
|||
session['namespace'] = namespace
|
||||
session['repository'] = repository
|
||||
|
||||
if get_authenticated_user():
|
||||
session['username'] = get_authenticated_user().username
|
||||
else:
|
||||
session.pop('username', None)
|
||||
|
||||
# We run our index and registry on the same hosts for now
|
||||
registry_server = urlparse.urlparse(request.url).netloc
|
||||
response.headers['X-Docker-Endpoints'] = registry_server
|
||||
|
@ -179,8 +184,9 @@ def create_repository(namespace, repository):
|
|||
if existing.docker_image_id in new_repo_images:
|
||||
added_images.pop(existing.docker_image_id)
|
||||
|
||||
username = get_authenticated_user() and get_authenticated_user().username
|
||||
for image_description in added_images.values():
|
||||
model.create_image(image_description['id'], repo)
|
||||
model.create_or_link_image(image_description['id'], repo, username)
|
||||
|
||||
response = make_response('Created', 201)
|
||||
|
||||
|
|
Reference in a new issue