mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-10 20:02:26 +00:00
Remove siteIds and build associations from user role chnages
This commit is contained in:
@@ -388,6 +388,11 @@ async function getOrCreateOrgClient(
|
||||
clientId: newClient.clientId
|
||||
});
|
||||
|
||||
await trx.insert(userClients).values({ // we also want to make sure that the user can see their own client if they are not an admin
|
||||
userId,
|
||||
clientId: newClient.clientId
|
||||
});
|
||||
|
||||
if (userOrg.roleId != adminRole.roleId) {
|
||||
// make sure the user can access the client
|
||||
trx.insert(userClients).values({
|
||||
|
||||
Reference in New Issue
Block a user