Use disable_registration keys if they are present

This commit is contained in:
Mark Haines 2015-04-30 14:34:09 +01:00
parent 1aa11cf7ce
commit c9e62927f2

View File

@ -26,6 +26,11 @@ class RegistrationConfig(Config):
self.disable_registration = not bool( self.disable_registration = not bool(
distutils.util.strtobool(str(config["enable_registration"])) distutils.util.strtobool(str(config["enable_registration"]))
) )
if "disable_registration" in config:
self.disable_registration = bool(
distutils.util.strtobool(str(config["disable_registration"]))
)
self.registration_shared_secret = config.get("registration_shared_secret") self.registration_shared_secret = config.get("registration_shared_secret")
def default_config(self, config_dir, server_name): def default_config(self, config_dir, server_name):