mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-09-06 19:42:04 +00:00
Allow enabling of registration with --disable-registration false
This commit is contained in:
parent
7393c5ce4c
commit
98a3825614
@ -17,12 +17,17 @@ from ._base import Config
|
|||||||
|
|
||||||
from synapse.util.stringutils import random_string_with_symbols
|
from synapse.util.stringutils import random_string_with_symbols
|
||||||
|
|
||||||
|
import distutils.util
|
||||||
|
|
||||||
|
|
||||||
class RegistrationConfig(Config):
|
class RegistrationConfig(Config):
|
||||||
|
|
||||||
def __init__(self, args):
|
def __init__(self, args):
|
||||||
super(RegistrationConfig, self).__init__(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
|
self.registration_shared_secret = args.registration_shared_secret
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@ -32,8 +37,9 @@ class RegistrationConfig(Config):
|
|||||||
|
|
||||||
reg_group.add_argument(
|
reg_group.add_argument(
|
||||||
"--disable-registration",
|
"--disable-registration",
|
||||||
action='store_const',
|
|
||||||
const=True,
|
const=True,
|
||||||
|
default=True,
|
||||||
|
nargs='?',
|
||||||
help="Disable registration of new users.",
|
help="Disable registration of new users.",
|
||||||
)
|
)
|
||||||
reg_group.add_argument(
|
reg_group.add_argument(
|
||||||
|
Loading…
Reference in New Issue
Block a user