diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-09-23 07:13:34 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-23 07:13:34 -0400 |
commit | e584534403b55ad3f250f92592e30b15b01f0201 (patch) | |
tree | 5561c7ba12f99eb72531b5b7ad3d60c7cd306b54 /synapse/rest/client/login.py | |
parent | Remove unnecessary parentheses around tuples returned from methods (#10889) (diff) | |
download | synapse-e584534403b55ad3f250f92592e30b15b01f0201.tar.xz |
Use direct references for some configuration variables (part 3) (#10885)
This avoids the overhead of searching through the various configuration classes by directly referencing the class that the attributes are in. It also improves type hints since mypy can now resolve the types of the configuration variables.
Diffstat (limited to 'synapse/rest/client/login.py')
-rw-r--r-- | synapse/rest/client/login.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/rest/client/login.py b/synapse/rest/client/login.py index a6ede7e2f3..d766e98dce 100644 --- a/synapse/rest/client/login.py +++ b/synapse/rest/client/login.py @@ -77,7 +77,7 @@ class LoginRestServlet(RestServlet): # SSO configuration. self.saml2_enabled = hs.config.saml2_enabled - self.cas_enabled = hs.config.cas_enabled + self.cas_enabled = hs.config.cas.cas_enabled self.oidc_enabled = hs.config.oidc_enabled self._msc2918_enabled = hs.config.access_token_lifetime is not None @@ -559,7 +559,7 @@ def register_servlets(hs: "HomeServer", http_server: HttpServer) -> None: if hs.config.access_token_lifetime is not None: RefreshTokenServlet(hs).register(http_server) SsoRedirectServlet(hs).register(http_server) - if hs.config.cas_enabled: + if hs.config.cas.cas_enabled: CasTicketServlet(hs).register(http_server) |