Add feature flag to disable username confirmation
Fixes https://jira.coreos.com/browse/QUAY-914
This commit is contained in:
parent
81ea73ce0d
commit
b2262eaf46
8 changed files with 33 additions and 3 deletions
|
@ -392,7 +392,8 @@ class User(ApiResource):
|
|||
new_username = user_data.get('username')
|
||||
previous_username = user.username
|
||||
|
||||
rename_allowed = features.USER_RENAME or confirm_username
|
||||
rename_allowed = (features.USER_RENAME or
|
||||
(confirm_username and features.USERNAME_CONFIRMATION))
|
||||
username_changing = new_username and new_username != previous_username
|
||||
|
||||
if rename_allowed and username_changing:
|
||||
|
|
Reference in a new issue