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

Clean-up from b19060a29b (#13094)
and 73af10f419 (#13093) which removed
all callers.
This commit is contained in:
Quentin Gliech 2022-09-14 16:33:54 +02:00 committed by GitHub
parent 51a77e990b
commit eaed4e6113
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

1
changelog.d/13795.misc Normal file
View File

@ -0,0 +1 @@
Remove unused method in `synapse.api.auth.Auth`.

View File

@ -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.