Merge branch 'master' of github.com:coreos-inc/quay
This commit is contained in:
commit
2b64b348b2
1 changed files with 3 additions and 3 deletions
|
@ -75,9 +75,6 @@ def generate_headers(scope=GrantType.READ_REPOSITORY):
|
|||
@index.route('/users', methods=['POST'])
|
||||
@index.route('/users/', methods=['POST'])
|
||||
def create_user():
|
||||
if not features.USER_CREATION:
|
||||
abort(400, 'User creation is disabled. Please speak to your administrator.')
|
||||
|
||||
user_data = request.get_json()
|
||||
if not user_data or not 'username' in user_data:
|
||||
abort(400, 'Missing username')
|
||||
|
@ -126,6 +123,9 @@ def create_user():
|
|||
|
||||
abort(400, 'Invalid password.', issue='login-failure')
|
||||
|
||||
elif not features.USER_CREATION:
|
||||
abort(400, 'User creation is disabled. Please speak to your administrator.')
|
||||
|
||||
else:
|
||||
# New user case
|
||||
logger.debug('Creating user')
|
||||
|
|
Reference in a new issue