[permissions] Add conditional permission gate on billing's checkoutSession (#10387)

Following a conversation with @etiennejouan and @martmull, we are adding
a permission gate on billing resolver's checkoutSession, which should
only be accessible to entitled users or at workspace creation (when
there are no roles yet), when the subscription is incomplete
This commit is contained in:
Marie
2025-02-21 15:01:36 +01:00
committed by GitHub
parent 0571eb2cf6
commit 6fb81e757b
6 changed files with 121 additions and 11 deletions

View File

@ -258,7 +258,7 @@ export class WorkspaceManagerService {
await this.userRoleService.assignRoleToUserWorkspace({
workspaceId,
userWorkspaceId: userWorkspace[0].id,
userWorkspaceId: userWorkspace.id,
roleId: adminRole.id,
});
}