mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
Fix issue with linking default user to org in single tenant + no-auth mode
This commit is contained in:
parent
d8fd958b0e
commit
c89226871e
1 changed files with 13 additions and 4 deletions
|
|
@ -54,10 +54,19 @@ const initSingleTenancy = async () => {
|
||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
members: {
|
members: {
|
||||||
create: {
|
upsert: {
|
||||||
role: OrgRole.MEMBER,
|
where: {
|
||||||
user: {
|
orgId_userId: {
|
||||||
connect: { id: SINGLE_TENANT_USER_ID }
|
orgId: SINGLE_TENANT_ORG_ID,
|
||||||
|
userId: SINGLE_TENANT_USER_ID,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
update: {},
|
||||||
|
create: {
|
||||||
|
role: OrgRole.MEMBER,
|
||||||
|
user: {
|
||||||
|
connect: { id: SINGLE_TENANT_USER_ID }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue