Add ability to restrict V1 push behind a namespace whitelist

Also enables the feature by default with an empty whitelist for QE

Fixes https://jira.coreos.com/browse/QUAY-1342
This commit is contained in:
Joseph Schorr 2019-03-05 16:50:56 -05:00
parent d3dd2f7b7c
commit b86d389c8e
9 changed files with 99 additions and 7 deletions

View file

@ -89,7 +89,6 @@ class SuperUserRegistryStatus(ApiResource):
@nickname('scRegistryStatus')
def get(self):
""" Returns the status of the registry. """
# If there is no config file, we need to setup the database.
if not config_provider.config_exists():
return {
@ -104,7 +103,9 @@ class SuperUserRegistryStatus(ApiResource):
config = config_provider.get_config()
if config and config['SETUP_COMPLETE']:
return 'config'
return {
'status': 'config'
}
return {
'status': 'create-superuser' if not database_has_users() else 'config'