Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Do not check for internal account lock for MSC3861 delegated auth
Browse files Browse the repository at this point in the history
  • Loading branch information
sandhose committed Aug 31, 2023
1 parent 1827963 commit 842b43c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
1 change: 1 addition & 0 deletions changelog.d/16215.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix a bug where admin tokens stopped working with MSC3861 auth delegation was enabled.
11 changes: 0 additions & 11 deletions synapse/api/auth/msc3861_delegated.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,17 +282,6 @@ async def get_user_by_req(
"Impersonation not possible by a non admin user",
)

# Deny the request if the user account is locked.
if not allow_locked and await self.store.get_user_locked_status(
requester.user.to_string()
):
raise AuthError(
401,
"User account has been locked",
errcode=Codes.USER_LOCKED,
additional_fields={"soft_logout": True},
)

if not allow_guest and requester.is_guest:
raise OAuthInsufficientScopeError([SCOPE_MATRIX_API])

Expand Down

0 comments on commit 842b43c

Please sign in to comment.