Skip to content

Commit 8cf314c

Browse files
committed
Expose Project.isMember flag
1 parent 589e65f commit 8cf314c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/components/project/dto/project.dto.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,11 @@ class Project extends Interfaces {
166166

167167
readonly rootDirectory: Secured<LinkTo<'Directory'> | null>;
168168

169+
@Field({
170+
description: 'Is the requesting user a member of this project?',
171+
})
172+
readonly isMember: boolean;
173+
169174
@Field({
170175
description: stripIndent`
171176
Whether or not this project and its associated languages (via engagements)

src/components/project/project.repository.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ export class ProjectRepository extends CommonRepository {
133133
merge('props', 'changedProps', {
134134
type: 'node.type',
135135
pinned: 'exists((:User { id: $requestingUser })-[:pinned]->(node))',
136+
isMember: '"member:true" in props.scopedRoles',
136137
rootDirectory: 'rootDirectory { .id }',
137138
primaryPartnership: 'primaryPartnership { .id }',
138139
primaryLocation: 'primaryLocation { .id }',

0 commit comments

Comments
 (0)