summary refs log tree commit diff
path: root/synapse/config
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-04-09 13:28:13 -0400
committerGitHub <noreply@github.com>2020-04-09 13:28:13 -0400
commitb85d7652ff084fee997e0bb44ecd46c2789abbdd (patch)
tree52f493a687c4a5b8a580c8bea4a8c66fda4723b1 /synapse/config
parentUnblacklist /upgrade creates a new room (#7228) (diff)
downloadsynapse-b85d7652ff084fee997e0bb44ecd46c2789abbdd.tar.xz
Do not allow a deactivated user to login via SSO. (#7240)
Diffstat (limited to 'synapse/config')
-rw-r--r--synapse/config/sso.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/config/sso.py b/synapse/config/sso.py
index ec3dca9efc..686678a3b7 100644
--- a/synapse/config/sso.py
+++ b/synapse/config/sso.py
@@ -12,6 +12,7 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
+import os
 from typing import Any, Dict
 
 import pkg_resources
@@ -36,6 +37,12 @@ class SSOConfig(Config):
             template_dir = pkg_resources.resource_filename("synapse", "res/templates",)
 
         self.sso_redirect_confirm_template_dir = template_dir
+        self.sso_account_deactivated_template = self.read_file(
+            os.path.join(
+                self.sso_redirect_confirm_template_dir, "sso_account_deactivated.html"
+            ),
+            "sso_account_deactivated_template",
+        )
 
         self.sso_client_whitelist = sso_config.get("client_whitelist") or []