Add support for configuring CloudFront storage engine
Fixes https://jira.coreos.com/browse/QS-116
This commit is contained in:
parent
f4f51934ef
commit
b0f656731c
5 changed files with 79 additions and 11 deletions
|
@ -20,7 +20,7 @@ from endpoints.api import (ApiResource, nickname, resource, internal_only, show_
|
|||
from endpoints.common import common_login
|
||||
from util.config.configutil import add_enterprise_config_defaults
|
||||
from util.config.database import sync_database_with_config
|
||||
from util.config.validator import validate_service_for_config, CONFIG_FILENAMES
|
||||
from util.config.validator import validate_service_for_config, is_valid_config_upload_filename
|
||||
from util.license import decode_license, LicenseDecodeError
|
||||
|
||||
import features
|
||||
|
@ -319,12 +319,12 @@ class SuperUserConfigFile(ApiResource):
|
|||
@verify_not_prod
|
||||
def get(self, filename):
|
||||
""" Returns whether the configuration file with the given name exists. """
|
||||
if not filename in CONFIG_FILENAMES:
|
||||
if not is_valid_config_upload_filename(filename):
|
||||
abort(404)
|
||||
|
||||
if SuperUserPermission().can():
|
||||
return {
|
||||
'exists': config_provider.volume_file_exists(filename)
|
||||
'exists': config_provider.volume_file_exists(filename)
|
||||
}
|
||||
|
||||
abort(403)
|
||||
|
@ -333,7 +333,7 @@ class SuperUserConfigFile(ApiResource):
|
|||
@verify_not_prod
|
||||
def post(self, filename):
|
||||
""" Updates the configuration file with the given name. """
|
||||
if not filename in CONFIG_FILENAMES:
|
||||
if not is_valid_config_upload_filename(filename):
|
||||
abort(404)
|
||||
|
||||
# Note: This method can be called before the configuration exists
|
||||
|
|
Reference in a new issue