From 0a26a3143e267f5c765f79fe6bd2c9aadb2e8845 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arwid=20Thornstr=C3=B6m?= Date: Thu, 23 Feb 2023 14:34:02 +0100 Subject: [PATCH] HOTFIX: fixed scopes for designers (#145) --- src/datasources/designer-api.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/datasources/designer-api.ts b/src/datasources/designer-api.ts index aa8d5d2..40ad8d0 100644 --- a/src/datasources/designer-api.ts +++ b/src/datasources/designer-api.ts @@ -21,10 +21,6 @@ export class DesignerAPI extends BaseSQLDataSource { } async getDesignerById(id: number): Promise { - ScopeAccess.validate(this.user).some([ - Scopes.DESIGNERS_READ, - Scopes.DESIGNERS_PUBLIC_READ, - ]); return this.loader.load(id); } @@ -49,7 +45,10 @@ export class DesignerAPI extends BaseSQLDataSource { limit: number = 5000, ids?: number[], ): Promise> { - ScopeAccess.validate(this.user).all([Scopes.DESIGNERS_READ]); + ScopeAccess.validate(this.user).some([ + Scopes.DESIGNERS_READ, + Scopes.DESIGNERS_PUBLIC_READ, + ]); return ( this.knex .select(