diff options
author | Erik Johnston <erik@matrix.org> | 2015-03-13 16:49:18 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-03-13 16:49:18 +0000 |
commit | 98a3825614328887ad1d855d2d1076496e49be6b (patch) | |
tree | 7685ddd070c4f5cb62129c4bf2909d0758a492c7 | |
parent | Rename register script to 'register_new_matrix_user' (diff) | |
download | synapse-98a3825614328887ad1d855d2d1076496e49be6b.tar.xz |
Allow enabling of registration with --disable-registration false
Diffstat (limited to '')
-rw-r--r-- | synapse/config/registration.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/config/registration.py b/synapse/config/registration.py index e015680d0a..3fed8364c7 100644 --- a/synapse/config/registration.py +++ b/synapse/config/registration.py @@ -17,12 +17,17 @@ from ._base import Config from synapse.util.stringutils import random_string_with_symbols +import distutils.util + class RegistrationConfig(Config): def __init__(self, args): super(RegistrationConfig, self).__init__(args) - self.disable_registration = args.disable_registration + + self.disable_registration = bool( + distutils.util.strtobool(str(args.disable_registration)) + ) self.registration_shared_secret = args.registration_shared_secret @classmethod @@ -32,8 +37,9 @@ class RegistrationConfig(Config): reg_group.add_argument( "--disable-registration", - action='store_const', const=True, + default=True, + nargs='?', help="Disable registration of new users.", ) reg_group.add_argument( |