mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-25 10:19:22 -05:00
Remove unused method in synapse.api.auth.Auth
. (#13795)
Clean-up fromb19060a29b
(#13094) and73af10f419
(#13093) which removed all callers.
This commit is contained in:
parent
51a77e990b
commit
eaed4e6113
1
changelog.d/13795.misc
Normal file
1
changelog.d/13795.misc
Normal file
@ -0,0 +1 @@
|
|||||||
|
Remove unused method in `synapse.api.auth.Auth`.
|
@ -459,15 +459,6 @@ class Auth:
|
|||||||
)
|
)
|
||||||
raise InvalidClientTokenError("Invalid access token passed.")
|
raise InvalidClientTokenError("Invalid access token passed.")
|
||||||
|
|
||||||
def get_appservice_by_req(self, request: SynapseRequest) -> ApplicationService:
|
|
||||||
token = self.get_access_token_from_request(request)
|
|
||||||
service = self.store.get_app_service_by_token(token)
|
|
||||||
if not service:
|
|
||||||
logger.warning("Unrecognised appservice access token.")
|
|
||||||
raise InvalidClientTokenError()
|
|
||||||
request.requester = create_requester(service.sender, app_service=service)
|
|
||||||
return service
|
|
||||||
|
|
||||||
async def is_server_admin(self, requester: Requester) -> bool:
|
async def is_server_admin(self, requester: Requester) -> bool:
|
||||||
"""Check if the given user is a local server admin.
|
"""Check if the given user is a local server admin.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user