From d0e93ec113659cc2250312cf61e874ea73ae31e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Hru=C5=A1ka?= Date: Wed, 2 Oct 2024 15:30:59 +0200 Subject: [PATCH 1/2] Log the credentials out when they are suspended --- seacatauth/credentials/service.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/seacatauth/credentials/service.py b/seacatauth/credentials/service.py index 6c92bb7a..0cd500a8 100644 --- a/seacatauth/credentials/service.py +++ b/seacatauth/credentials/service.py @@ -521,6 +521,11 @@ async def update_credentials(self, credentials_id: str, update_dict: dict, sessi }) self.App.PubSub.publish("Credentials.updated!", credentials_id=credentials_id) + # Log the credentials out if they have been suspended + if validated_data.get("suspended") is True: + session_service = self.App.get_service("seacatauth.SessionService") + await session_service.delete_sessions_by_credentials_id(credentials_id) + return {"status": "OK"} From 940bd79c67064a04acb955459b61f7942d8a38fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20Hru=C5=A1ka?= Date: Wed, 2 Oct 2024 16:14:52 +0200 Subject: [PATCH 2/2] update CHANGELOG.md --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a40b3a49..d6691c23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,11 @@ ## v24.39 ### Pre-releases +- v24.39-alpha2 - v24.39-alpha1 ### Fix +- Log the credentials out when they are suspended (#425, `v24.39-alpha2`) - Fix credentials custom data editing (#424, `v24.39-alpha1`) ---