mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Working on role in workspace.
This commit is contained in:
@@ -32,10 +32,13 @@ export const registerUserAction = action
|
||||
where: {slug: "default"},
|
||||
});
|
||||
|
||||
const organizationRole = users.length > 0 ? "member" : "admin"
|
||||
|
||||
await prisma.userOrganization.create({
|
||||
data: {
|
||||
userId: newUser.id,
|
||||
organizationId: defaultOrganization.id
|
||||
organizationId: defaultOrganization.id,
|
||||
role:organizationRole
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user