diff options
author | Neil Johnson <neil@fragile.org.uk> | 2018-11-06 21:42:27 +0000 |
---|---|---|
committer | Neil Johnson <neil@fragile.org.uk> | 2018-11-06 21:42:27 +0000 |
commit | 373a4610889bcf3b240ffbffc49be45480f3dded (patch) | |
tree | eec4a1d3b26165c5bd6c572f6704a52183428c29 | |
parent | fix py2/3 incompatibility (diff) | |
download | synapse-373a4610889bcf3b240ffbffc49be45480f3dded.tar.xz |
remove need to create support user in homeserver
-rwxr-xr-x | synapse/app/homeserver.py | 19 | ||||
-rw-r--r-- | synapse/config/server.py | 6 | ||||
-rw-r--r-- | tests/storage/test_monthly_active_users.py | 1 |
3 files changed, 2 insertions, 24 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 186ebed2fa..e2853972be 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -554,25 +554,6 @@ def run(hs): clock.looping_call(start_generate_monthly_active_users, 5 * 60 * 1000) # End of monthly active user settings - @defer.inlineCallbacks - def create_support_user(): - if hs.config.support_user_id: - # check not already created - support_user = yield hs.get_datastore().get_users_by_id_case_insensitive( - hs.config.support_user_id - ) - # if not create - if not support_user: - registration_handler = hs.get_handlers().registration_handler - (user_id, token) = yield registration_handler.register( - localpart=UserID.from_string(hs.config.support_user_id).localpart, - password=hs.config.support_user_pass, - ) - run_as_background_process( - "create_support_user", - create_support_user, - ) - if hs.config.report_stats: logger.info("Scheduling stats reporting for 3 hour intervals") clock.looping_call(start_phone_stats_home, 3 * 60 * 60 * 1000) diff --git a/synapse/config/server.py b/synapse/config/server.py index 38d862698d..159a611e58 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -86,13 +86,11 @@ class ServerConfig(Config): self.mau_trial_days = config.get( "mau_trial_days", 0, ) - self.support_user_pass = None self.support_user_id = None autocreate_support_user = config.get('autocreate_support_user', None) if autocreate_support_user: - self.support_user_pass = str(autocreate_support_user['password']) - localpart = autocreate_support_user['localpart'] - self.support_user_id = UserID(localpart, self.server_name).to_string() + autocreate_support_userID = UserID(local_part, self.server_name) + self.support_user_id = autocreate_support_userID.to_string() # Options to disable HS self.hs_disabled = config.get("hs_disabled", False) diff --git a/tests/storage/test_monthly_active_users.py b/tests/storage/test_monthly_active_users.py index cf33b90b2c..b46727cba0 100644 --- a/tests/storage/test_monthly_active_users.py +++ b/tests/storage/test_monthly_active_users.py @@ -29,7 +29,6 @@ class MonthlyActiveUsersTestCase(HomeserverTestCase): hs.config.limit_usage_by_mau = True hs.config.max_mau_value = 50 hs.config.support_user_id = "@support:test" - hs.config.support_user_pass = "password" # Advance the clock a bit reactor.advance(FORTY_DAYS) |