Skip to content

Commit

Permalink
Merge pull request #425 from TeskaLabs/fix/log-out-when-suspended
Browse files Browse the repository at this point in the history
Log the credentials out when they are suspended
  • Loading branch information
byewokko authored Oct 3, 2024
2 parents 1dc29cc + 940bd79 commit 3491da8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)

---
Expand Down
5 changes: 5 additions & 0 deletions seacatauth/credentials/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"}


Expand Down

0 comments on commit 3491da8

Please sign in to comment.