mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 02:26:40 +00:00
feat: updated nitpicks
This commit is contained in:
+1
-1
@@ -208,7 +208,7 @@ export const identityProjectAdditionalPrivilegeServiceFactory = ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const isTemporary = typeof data?.isTemporary !== "undefined" ? data.isTemporary : identityPrivilege.isTemporary;
|
const isTemporary = typeof data?.isTemporary !== "undefined" ? data.isTemporary : identityPrivilege.isTemporary;
|
||||||
validateHandlebarTemplate("Identity Additional Privilege Create", JSON.stringify(data.permissions || []), {
|
validateHandlebarTemplate("Identity Additional Privilege Update", JSON.stringify(data.permissions || []), {
|
||||||
allowedExpressions: (val) => val.includes("identity.")
|
allowedExpressions: (val) => val.includes("identity.")
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -93,7 +93,7 @@ export const projectUserAdditionalPrivilegeServiceFactory = ({
|
|||||||
if (existingSlug)
|
if (existingSlug)
|
||||||
throw new BadRequestError({ message: `Additional privilege with provided slug ${slug} already exists` });
|
throw new BadRequestError({ message: `Additional privilege with provided slug ${slug} already exists` });
|
||||||
|
|
||||||
validateHandlebarTemplate("User Additional Privilege Update", JSON.stringify(customPermission || []), {
|
validateHandlebarTemplate("User Additional Privilege Create", JSON.stringify(customPermission || []), {
|
||||||
allowedExpressions: (val) => val.includes("identity.")
|
allowedExpressions: (val) => val.includes("identity.")
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -73,13 +73,13 @@ export const projectRoleServiceFactory = ({
|
|||||||
throw new BadRequestError({ name: "Create Role", message: "Project role with same slug already exists" });
|
throw new BadRequestError({ name: "Create Role", message: "Project role with same slug already exists" });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
validateHandlebarTemplate("Project Role Create", JSON.stringify(data.permissions || []), {
|
||||||
|
allowedExpressions: (val) => val.includes("identity.")
|
||||||
|
});
|
||||||
const role = await projectRoleDAL.create({
|
const role = await projectRoleDAL.create({
|
||||||
...data,
|
...data,
|
||||||
projectId
|
projectId
|
||||||
});
|
});
|
||||||
validateHandlebarTemplate("Project Role Create", JSON.stringify(data.permissions || []), {
|
|
||||||
allowedExpressions: (val) => val.includes("identity.")
|
|
||||||
});
|
|
||||||
return { ...role, permissions: unpackPermissions(role.permissions) };
|
return { ...role, permissions: unpackPermissions(role.permissions) };
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ export const projectRoleServiceFactory = ({
|
|||||||
if (existingRole && existingRole.id !== roleId)
|
if (existingRole && existingRole.id !== roleId)
|
||||||
throw new BadRequestError({ name: "Update Role", message: "Project role with the same slug already exists" });
|
throw new BadRequestError({ name: "Update Role", message: "Project role with the same slug already exists" });
|
||||||
}
|
}
|
||||||
validateHandlebarTemplate("Project Role Upadte", JSON.stringify(data.permissions || []), {
|
validateHandlebarTemplate("Project Role Update", JSON.stringify(data.permissions || []), {
|
||||||
allowedExpressions: (val) => val.includes("identity.")
|
allowedExpressions: (val) => val.includes("identity.")
|
||||||
});
|
});
|
||||||
const updatedRole = await projectRoleDAL.updateById(projectRole.id, {
|
const updatedRole = await projectRoleDAL.updateById(projectRole.id, {
|
||||||
|
|||||||
Reference in New Issue
Block a user