From 8a16a5ac05defa5b7f691aa669c359e01040a190 Mon Sep 17 00:00:00 2001 From: Marie PUPO JEAMMET Date: Thu, 27 Nov 2025 18:03:41 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(scim)=20interop=20grist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + src/backend/core/utils/scim.py | 12 ++---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7a652db..7f88d6a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to ## [Unreleased] +- ✨(scim) interop with grist - 🛂(permissions) return 404 to users with no access to domain #985 - ✨(aliases) can create, list and delete aliases #974 diff --git a/src/backend/core/utils/scim.py b/src/backend/core/utils/scim.py index 08d50a0b..013e9387 100644 --- a/src/backend/core/utils/scim.py +++ b/src/backend/core/utils/scim.py @@ -33,7 +33,7 @@ class SCIMClient: "op": "add", "path": "members", "value": [ - {"value": str(user.id), "email": user.email, "type": "User"} + {"value": user.sub, "display": user.email, "type": "User"} ], } ], @@ -53,15 +53,7 @@ class SCIMClient: """Remove a user from a group by its ID or email.""" payload = { "schemas": ["urn:ietf:params:scim:api:messages:2.0:PatchOp"], - "Operations": [ - { - "op": "remove", - "path": "members", - "value": [ - {"value": str(user.id), "email": user.email, "type": "User"} - ], - } - ], + "Operations": [{"op": "remove", "path": f'members[value eq "{user.sub}"]'}], } response = session.patch( webhook.url,