summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorAurélien Grimpard <aurelien@grimpard.net>2023-09-06 20:32:24 +0200
committerGitHub <noreply@github.com>2023-09-06 14:32:24 -0400
commitfe69e7f617199f51eb97f510a0a934fdcf02fbad (patch)
tree0768d0737a291cd5e71a0c02034ec6a54a0ca753 /synapse/config
parentMerge remote-tracking branch 'origin/release-v1.92' into develop (diff)
downloadsynapse-fe69e7f617199f51eb97f510a0a934fdcf02fbad.tar.xz
Handle "registration_enabled" parameter for CAS (#16262)
Similar to OIDC, CAS providers can now disable registration such
that only existing users are able to login via SSO.
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/cas.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/config/cas.py b/synapse/config/cas.py
index 6e2d9addbf..bbc8f43073 100644
--- a/synapse/config/cas.py
+++ b/synapse/config/cas.py
@@ -57,6 +57,8 @@ class CasConfig(Config):
                 required_attributes
             )
 
+            self.cas_enable_registration = cas_config.get("enable_registration", True)
+
             self.idp_name = cas_config.get("idp_name", "CAS")
             self.idp_icon = cas_config.get("idp_icon")
             self.idp_brand = cas_config.get("idp_brand")
@@ -67,6 +69,7 @@ class CasConfig(Config):
             self.cas_protocol_version = None
             self.cas_displayname_attribute = None
             self.cas_required_attributes = []
+            self.cas_enable_registration = False
 
 
 # CAS uses a legacy required attributes mapping, not the one provided by