Revert local validation context, extract another util

This commit is contained in:
Sam Chow 2018-06-28 19:42:08 -04:00 committed by Sam Chow
parent d7ffb54333
commit 14fefea38f
6 changed files with 18 additions and 24 deletions

View file

@ -271,15 +271,11 @@ class SuperUserConfigValidate(ApiResource):
# Note: This method is called to validate the database configuration before super users exists,
# so we also allow it to be called if there is no valid registry configuration setup. Note that
# this is also safe since this method does not access any information not given in the request.
# We can skip localstorage validation, since we can't guarantee that this will be the same machine
# Q.E. will run under
config = request.get_json()['config']
validator_context = ValidatorContext.from_app(app, config, request.get_json().get('password', ''),
instance_keys=instance_keys,
ip_resolver=ip_resolver,
config_provider=config_provider,
skip_localstorage_validation=True)
config_provider=config_provider)
return validate_service_for_config(service, validator_context)