update setting name, tests
This commit is contained in:
parent
0b12e2827f
commit
07af134027
4 changed files with 14 additions and 5 deletions
|
|
@ -2115,6 +2115,14 @@ class TestUnconnectedCommand(BaseEvenniaCommandTest):
|
||||||
self.call(unloggedin.CmdUnconnectedInfo(), "", expected)
|
self.call(unloggedin.CmdUnconnectedInfo(), "", expected)
|
||||||
del gametime.SERVER_START_TIME
|
del gametime.SERVER_START_TIME
|
||||||
|
|
||||||
|
@override_settings(NEW_ACCOUNT_REGISTRATION_ENABLED=False)
|
||||||
|
def test_disabled_registration(self):
|
||||||
|
self.call(
|
||||||
|
unloggedin.CmdUnconnectedCreate(),
|
||||||
|
"testacct testpass",
|
||||||
|
"Registration is currently disabled.",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# Test syscommands
|
# Test syscommands
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -174,7 +174,7 @@ class CmdUnconnectedCreate(COMMAND_DEFAULT_CLASS):
|
||||||
|
|
||||||
def at_pre_cmd(self):
|
def at_pre_cmd(self):
|
||||||
"""Verify that account creation is enabled."""
|
"""Verify that account creation is enabled."""
|
||||||
if not settings.REGISTER_ENABLED:
|
if not settings.NEW_ACCOUNT_REGISTRATION_ENABLED:
|
||||||
# truthy return cancels the command
|
# truthy return cancels the command
|
||||||
self.msg("Registration is currently disabled.")
|
self.msg("Registration is currently disabled.")
|
||||||
return True
|
return True
|
||||||
|
|
|
||||||
|
|
@ -34,8 +34,9 @@ SERVER_HOSTNAME = "localhost"
|
||||||
# Lockdown mode will cut off the game from any external connections
|
# Lockdown mode will cut off the game from any external connections
|
||||||
# and only allow connections from localhost. Requires a cold reboot.
|
# and only allow connections from localhost. Requires a cold reboot.
|
||||||
LOCKDOWN_MODE = False
|
LOCKDOWN_MODE = False
|
||||||
# Enables new account registration
|
# Controls whether new account registration is available.
|
||||||
REGISTER_ENABLED = True
|
# Set to False to lock down the registration page and the create account command.
|
||||||
|
NEW_ACCOUNT_REGISTRATION_ENABLED = True
|
||||||
# Activate telnet service
|
# Activate telnet service
|
||||||
TELNET_ENABLED = True
|
TELNET_ENABLED = True
|
||||||
# A list of ports the Evennia telnet server listens on Can be one or many.
|
# A list of ports the Evennia telnet server listens on Can be one or many.
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ def load_game_settings():
|
||||||
GAME_SLOGAN = SERVER_VERSION
|
GAME_SLOGAN = SERVER_VERSION
|
||||||
SERVER_HOSTNAME = settings.SERVER_HOSTNAME
|
SERVER_HOSTNAME = settings.SERVER_HOSTNAME
|
||||||
|
|
||||||
REGISTER_ENABLED = settings.REGISTER_ENABLED
|
REGISTER_ENABLED = settings.NEW_ACCOUNT_REGISTRATION_ENABLED
|
||||||
|
|
||||||
TELNET_ENABLED = settings.TELNET_ENABLED
|
TELNET_ENABLED = settings.TELNET_ENABLED
|
||||||
TELNET_PORTS = settings.TELNET_PORTS
|
TELNET_PORTS = settings.TELNET_PORTS
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue