From 33cd3cbf271fd004bf9f8da9c3fde6a1064bf6d7 Mon Sep 17 00:00:00 2001 From: Alex Tugarev Date: Wed, 13 Sep 2023 12:46:53 +0200 Subject: [PATCH] remove perm check on internal findTokensForIdentity (#18708) --- components/server/src/user/user-service.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/components/server/src/user/user-service.ts b/components/server/src/user/user-service.ts index 485390e689deaa..23538b4253aa16 100644 --- a/components/server/src/user/user-service.ts +++ b/components/server/src/user/user-service.ts @@ -94,11 +94,6 @@ export class UserService { async findTokensForIdentity(userId: string, identity: Identity): Promise { const result = await this.userDb.findTokensForIdentity(identity); - for (const token of result) { - if (!(await this.authorizer.hasPermissionOnUser(userId, "read_info", token.uid))) { - throw new ApplicationError(ErrorCodes.NOT_FOUND, "not found"); - } - } return result; }