mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 06:23:47 +01:00
Handle the Synapse admin scope
This commit is contained in:
parent
c5cf1b421d
commit
7628dbf4e9
1 changed files with 3 additions and 0 deletions
|
@ -140,6 +140,9 @@ class OAuthDelegatedAuth(BaseAuth):
|
||||||
resp = json_decoder.decode(resp_body.decode("utf-8"))
|
resp = json_decoder.decode(resp_body.decode("utf-8"))
|
||||||
return IntrospectionToken(**resp)
|
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(
|
async def get_user_by_req(
|
||||||
self,
|
self,
|
||||||
request: SynapseRequest,
|
request: SynapseRequest,
|
||||||
|
|
Loading…
Reference in a new issue