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

Commit

Permalink
Remove unused method in synapse.api.auth.Auth. (#13795)
Browse files Browse the repository at this point in the history
Clean-up from b19060a (#13094)
and 73af10f (#13093) which removed
all callers.
  • Loading branch information
sandhose authored Sep 14, 2022
1 parent 51a77e9 commit eaed4e6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
1 change: 1 addition & 0 deletions changelog.d/13795.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove unused method in `synapse.api.auth.Auth`.
9 changes: 0 additions & 9 deletions synapse/api/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,15 +459,6 @@ async def get_user_by_access_token(
)
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:
"""Check if the given user is a local server admin.
Expand Down

0 comments on commit eaed4e6

Please sign in to comment.