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
@@ -308,14 +308,16 @@ export const assignToWorkspace = async (
await updateWorkspaceRole({
userId: user.id,
workspaceId: workspace.id,
role
role,
updatedByUserId: workspace.ownerId
})
if (seatType) {
await assignWorkspaceSeat({
userId: user.id,
workspaceId: workspace.id,
type: seatType
type: seatType,
assignedByUserId: workspace.ownerId
})
}
}