updates to client role

This commit is contained in:
2025-05-06 15:32:03 +05:30
parent 16428cf895
commit 8fc310c94c
2 changed files with 4 additions and 2 deletions

View File

@@ -17,10 +17,10 @@ export async function createRts(
input: CreateRtsInput, input: CreateRtsInput,
user: AuthenticatedUser user: AuthenticatedUser
) { ) {
let defaultClient = null; let defaultClient = input.client;
const userInDb = await getUser(user.userId); const userInDb = await getUser(user.userId);
if (userInDb && userInDb.orgId) { if (userInDb && userInDb.orgId) {
defaultClient = userInDb.orgId; defaultClient = userInDb.orgId.toString();
} }
return await rtsModel.create({ return await rtsModel.create({

View File

@@ -107,6 +107,8 @@ export const rules: Record<
"permit:read", "permit:read",
"file:upload", "file:upload",
"file:download", "file:download",
"rts:read",
"rts:write",
"view:read", "view:read",
"view:write", "view:write",
"view:delete", "view:delete",