Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

scim: Add SCIMConfigDict.

Zixuan James Li0952b024c1ca
diff --git a/zerver/lib/types.py b/zerver/lib/types.py
index 381950bd208..94e809c927b 100644
--- a/zerver/lib/types.py
+++ b/zerver/lib/types.py
@@ -273,3 +273,9 @@ class RealmPlaygroundDict(TypedDict):
name: str
pygments_language: str
url_prefix: str
+
+
+class SCIMConfigDict(TypedDict):
+ bearer_token: str
+ scim_client_name: str
+ name_formatted_included: bool
diff --git a/zproject/dev_settings.py b/zproject/dev_settings.py
index c9153f1e7b3..f5e906157a6 100644
--- a/zproject/dev_settings.py
+++ b/zproject/dev_settings.py
@@ -1,8 +1,9 @@
import os
import pwd
-from typing import Optional, Set, Tuple
+from typing import Dict, Optional, Set, Tuple
from scripts.lib.zulip_tools import deport
+from zerver.lib.types import SCIMConfigDict
ZULIP_ADMINISTRATOR = "[email protected]"
@@ -186,7 +187,7 @@ SOCIAL_AUTH_SUBDOMAIN = "auth"
MEMCACHED_USERNAME: Optional[str] = None
-SCIM_CONFIG = {
+SCIM_CONFIG: Dict[str, SCIMConfigDict] = {
"zulip": {
"bearer_token": "token1234",
"scim_client_name": "test-scim-client",
diff --git a/zproject/test_extra_settings.py b/zproject/test_extra_settings.py
index 23b5964eecf..175a86c4083 100644
--- a/zproject/test_extra_settings.py
+++ b/zproject/test_extra_settings.py
@@ -5,7 +5,7 @@ import ldap
from django_auth_ldap.config import LDAPSearch
from zerver.lib.db import TimeTrackingConnection, TimeTrackingCursor
-from zerver.lib.types import SAMLIdPConfigDict
+from zerver.lib.types import SAMLIdPConfigDict, SCIMConfigDict
from .config import DEPLOY_ROOT, get_from_file_if_exists
from .settings import (
@@ -272,7 +272,7 @@ RATE_LIMITING_RULES: Dict[str, List[Tuple[int, int]]] = {
FREE_TRIAL_DAYS: Optional[int] = None
-SCIM_CONFIG = {
+SCIM_CONFIG: Dict[str, SCIMConfigDict] = {
"zulip": {
"bearer_token": "token1234",
"scim_client_name": "test-scim-client",