Move config provider to _init to decouple from app
remove app references from validators
This commit is contained in:
parent
86929c16d3
commit
d45b925155
26 changed files with 54 additions and 51 deletions
|
@ -64,7 +64,7 @@ VALIDATORS = {
|
|||
AppTokenAuthValidator.name: AppTokenAuthValidator.validate,
|
||||
}
|
||||
|
||||
def validate_service_for_config(service, config, password=None):
|
||||
def validate_service_for_config(service, config, password=None, app=None):
|
||||
""" Attempts to validate the configuration for the given service. """
|
||||
if not service in VALIDATORS:
|
||||
return {
|
||||
|
@ -72,7 +72,7 @@ def validate_service_for_config(service, config, password=None):
|
|||
}
|
||||
|
||||
try:
|
||||
VALIDATORS[service](config, get_authenticated_user(), password)
|
||||
VALIDATORS[service](config, get_authenticated_user(), password, app)
|
||||
return {
|
||||
'status': True
|
||||
}
|
||||
|
|
Reference in a new issue