Merge branch 'master' of https://bitbucket.org/yackob03/quay
This commit is contained in:
commit
45a8f52a8f
1 changed files with 4 additions and 6 deletions
|
@ -1,6 +1,4 @@
|
|||
import json
|
||||
import urllib
|
||||
import json
|
||||
import logging
|
||||
import urlparse
|
||||
|
||||
|
@ -11,7 +9,7 @@ from data import model
|
|||
from app import app, mixpanel
|
||||
from auth.auth import (process_auth, get_authenticated_user,
|
||||
get_validated_token)
|
||||
from util.names import parse_namespace_repository, parse_repository_name
|
||||
from util.names import parse_repository_name
|
||||
from util.email import send_confirmation_email
|
||||
from auth.permissions import (ModifyRepositoryPermission, UserPermission,
|
||||
ReadRepositoryPermission,
|
||||
|
@ -54,7 +52,7 @@ def create_user():
|
|||
|
||||
if username == '$token':
|
||||
try:
|
||||
token = model.load_token_data(password)
|
||||
model.load_token_data(password)
|
||||
return make_response('Verified', 201)
|
||||
except model.InvalidTokenException:
|
||||
abort(401)
|
||||
|
@ -130,7 +128,7 @@ def create_repository(namespace, repository):
|
|||
abort(403)
|
||||
|
||||
else:
|
||||
permission = CreateRepoPermission('namespace')
|
||||
permission = CreateRepositoryPermission('namespace')
|
||||
if not permission.can():
|
||||
logger.info('Attempt to create a new repo with insufficient perms.')
|
||||
abort(403)
|
||||
|
@ -151,7 +149,7 @@ def create_repository(namespace, repository):
|
|||
existing.delete_instance(recursive=True)
|
||||
|
||||
for image_description in added_images.values():
|
||||
image = model.create_image(image_description['id'], repo)
|
||||
model.create_image(image_description['id'], repo)
|
||||
|
||||
response = make_response('Created', 201)
|
||||
|
||||
|
|
Reference in a new issue