feat(server): support editor -> viewer seat downgrades (#4181)

* new seat based project role checks implemented

* everything done

* minor bugfix
This commit is contained in:
Kristaps Fabians Geikins
2025-03-14 14:21:25 +02:00
committed by GitHub
parent 50fd05afe8
commit d903e8ffc4
30 changed files with 975 additions and 337 deletions
@@ -127,7 +127,7 @@ export default FF_WORKSPACES_MODULE_ENABLED
workspaceJoinRequestMutations: () => ({})
},
WorkspaceJoinRequestMutations: {
approve: async (_parent, args) => {
approve: async (_parent, args, ctx) => {
const approveWorkspaceJoinRequest =
commandFactory<ApproveWorkspaceJoinRequest>({
db,
@@ -163,7 +163,8 @@ export default FF_WORKSPACES_MODULE_ENABLED
})
return await approveWorkspaceJoinRequest({
userId: args.input.userId,
workspaceId: args.input.workspaceId
workspaceId: args.input.workspaceId,
approvedByUserId: ctx.userId!
})
},
deny: async (_parent, args) => {