diff options
author | Quentin Gliech <quenting@element.io> | 2022-06-20 11:17:48 +0200 |
---|---|---|
committer | Patrick Cloke <clokep@users.noreply.github.com> | 2023-05-30 09:43:06 -0400 |
commit | 7628dbf4e9b48d9714ccbd0530af579d9c290fed (patch) | |
tree | 5e6e0e6169e7a0d09de87662cb2373a2f85c73bf /synapse/api/auth | |
parent | Save the scopes in the requester (diff) | |
download | synapse-7628dbf4e9b48d9714ccbd0530af579d9c290fed.tar.xz |
Handle the Synapse admin scope
Diffstat (limited to 'synapse/api/auth')
-rw-r--r-- | synapse/api/auth/oauth_delegated.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/api/auth/oauth_delegated.py b/synapse/api/auth/oauth_delegated.py index 2715127e32..ff1f395e58 100644 --- a/synapse/api/auth/oauth_delegated.py +++ b/synapse/api/auth/oauth_delegated.py @@ -140,6 +140,9 @@ class OAuthDelegatedAuth(BaseAuth): resp = json_decoder.decode(resp_body.decode("utf-8")) return IntrospectionToken(**resp) + async def is_server_admin(self, requester: Requester) -> bool: + return "urn:synapse:admin:*" in requester.scope + async def get_user_by_req( self, request: SynapseRequest, |