From cefa7746d1bd015301b39efb6d78a65327da3f17 Mon Sep 17 00:00:00 2001 From: Valentin Yanakiev Date: Fri, 20 Dec 2024 13:00:19 +0200 Subject: [PATCH] fix dashboard access on private spaces for non-members (#4797) --- .../collaboration/collaboration.resolver.fields.ts | 2 -- src/domain/space/space/space.resolver.fields.ts | 1 - src/services/api/lookup/lookup.resolver.fields.ts | 7 ------- 3 files changed, 10 deletions(-) diff --git a/src/domain/collaboration/collaboration/collaboration.resolver.fields.ts b/src/domain/collaboration/collaboration/collaboration.resolver.fields.ts index fb1e8494d7..d539b71ee1 100644 --- a/src/domain/collaboration/collaboration/collaboration.resolver.fields.ts +++ b/src/domain/collaboration/collaboration/collaboration.resolver.fields.ts @@ -94,8 +94,6 @@ export class CollaborationResolverFields { return tagsetTemplateSet.tagsetTemplates; } - @AuthorizationAgentPrivilege(AuthorizationPrivilege.READ) - @UseGuards(GraphqlGuard) @ResolveField('license', () => ILicense, { nullable: false, description: 'The License operating on this Collaboration.', diff --git a/src/domain/space/space/space.resolver.fields.ts b/src/domain/space/space/space.resolver.fields.ts index 734f52f07b..230cd490e3 100644 --- a/src/domain/space/space/space.resolver.fields.ts +++ b/src/domain/space/space/space.resolver.fields.ts @@ -106,7 +106,6 @@ export class SpaceResolverFields { return this.spaceService.activeSubscription(space); } - @UseGuards(GraphqlGuard) @ResolveField('collaboration', () => ICollaboration, { nullable: false, description: 'The collaboration for the Space.', diff --git a/src/services/api/lookup/lookup.resolver.fields.ts b/src/services/api/lookup/lookup.resolver.fields.ts index 8cd6a891a5..3a1d779679 100644 --- a/src/services/api/lookup/lookup.resolver.fields.ts +++ b/src/services/api/lookup/lookup.resolver.fields.ts @@ -426,7 +426,6 @@ export class LookupResolverFields { return community; } - @UseGuards(GraphqlGuard) @ResolveField(() => ICollaboration, { nullable: true, description: 'Lookup the specified Collaboration', @@ -437,12 +436,6 @@ export class LookupResolverFields { ): Promise { const collaboration = await this.collaborationService.getCollaborationOrFail(id); - this.authorizationService.grantAccessOrFail( - agentInfo, - collaboration.authorization, - AuthorizationPrivilege.READ, - `lookup Collaboration: ${collaboration.id}` - ); return collaboration; }