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

Remove unused method in synapse.api.auth.Auth. #13795

Merged
merged 2 commits into from
Sep 14, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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