From ee20737e4a26e6988d1d9886288aa49fa4de53a2 Mon Sep 17 00:00:00 2001 From: Mateusz Kwasniewski Date: Tue, 28 Feb 2023 14:48:27 +0100 Subject: [PATCH] refactor: make permission check type less demanding (#3214) --- src/lib/services/access-service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib/services/access-service.ts b/src/lib/services/access-service.ts index 27988dda81..8eb193ad03 100644 --- a/src/lib/services/access-service.ts +++ b/src/lib/services/access-service.ts @@ -105,7 +105,7 @@ export class AccessService { * @param projectId */ async hasPermission( - user: User, + user: Pick, permission: string, projectId?: string, environment?: string, @@ -143,7 +143,9 @@ export class AccessService { } } - async getPermissionsForUser(user: IUser): Promise { + async getPermissionsForUser( + user: Pick, + ): Promise { if (user.isAPI) { return user.permissions?.map((p) => ({ permission: p,