misc: minor format

This commit is contained in:
Sheen Capadngan
2025-03-14 03:47:12 +08:00
parent bdb7cb4cbf
commit 430f8458cb
3 changed files with 16 additions and 11 deletions
@@ -187,7 +187,9 @@ const constructPermissionErrorMessage = (
opAction: OrgPermissionSet[0] | ProjectPermissionSet[0], opAction: OrgPermissionSet[0] | ProjectPermissionSet[0],
opSubject: OrgPermissionSet[1] | ProjectPermissionSet[1] opSubject: OrgPermissionSet[1] | ProjectPermissionSet[1]
) => { ) => {
return `${baseMessage}${shouldUseNewPrivilegeSystem ? `. Missing permission ${opAction} on ${opSubject}` : ""}`; return `${baseMessage}${
shouldUseNewPrivilegeSystem ? `. Missing permission ${opAction as string} on ${opSubject as string}` : ""
}`;
}; };
export { export {
+2 -2
View File
@@ -1076,9 +1076,9 @@ export const orgServiceFactory = ({
const sanitizedProjectMembershipRoles: TProjectUserMembershipRolesInsert[] = []; const sanitizedProjectMembershipRoles: TProjectUserMembershipRolesInsert[] = [];
invitedProjectRoles.forEach((projectRole) => { invitedProjectRoles.forEach((projectRole) => {
const isCustomRole = Boolean(customRolesGroupBySlug?.[projectRole]?.[0]); const isCustomRole = Boolean(customRolesGroupBySlug?.[projectRole]?.[0]);
projectMemberships.forEach((membership) => { projectMemberships.forEach((membershipEntry) => {
sanitizedProjectMembershipRoles.push({ sanitizedProjectMembershipRoles.push({
projectMembershipId: membership.id, projectMembershipId: membershipEntry.id,
role: isCustomRole ? ProjectMembershipRole.Custom : projectRole, role: isCustomRole ? ProjectMembershipRole.Custom : projectRole,
customRoleId: customRolesGroupBySlug[projectRole] ? customRolesGroupBySlug[projectRole][0].id : null customRoleId: customRolesGroupBySlug[projectRole] ? customRolesGroupBySlug[projectRole][0].id : null
}); });
@@ -64,7 +64,7 @@ export const UpgradePrivilegeSystemModal = ({ isOpen, onOpenChange }: Props) =>
Introducing Permission-Based Privilege Management Introducing Permission-Based Privilege Management
</h4> </h4>
<p className="mb-4 leading-7 text-mineshaft-100"> <p className="mb-4 leading-7 text-mineshaft-100">
We've developed an improved privilege management system that enhances how access We&apos;ve developed an improved privilege management system that enhances how access
controls work in your organization. controls work in your organization.
</p> </p>
@@ -75,19 +75,22 @@ export const UpgradePrivilegeSystemModal = ({ isOpen, onOpenChange }: Props) =>
<p className="font-medium">How it works:</p> <p className="font-medium">How it works:</p>
</div> </div>
<div className="mb-3 ml-7"> <div className="mb-3 ml-7">
<p className="mb-1"> <p className="mb-3">
<strong>Legacy system:</strong> Users with higher privilege levels could modify <strong>Legacy system:</strong> Users with higher privilege levels could modify
access for anyone below them. access for anyone below them. This limits accountability and makes it impossible
to allow specialized roles (like team leads) to manage their team&apos;s access
without granting them broader administrative powers.
</p> </p>
<p> <p>
<strong>New system:</strong> Users need explicit permission to modify specific <strong>New system:</strong> Users need explicit permission to modify specific
access levels, providing targeted control. After upgrading, you'll need to grant access levels, providing targeted control. After upgrading, you&apos;ll need to
the new 'Manage Privileges' permission at organization or project level. grant the new &apos;Manage Privileges&apos; permission at organization or project
level.
</p> </p>
</div> </div>
</div> </div>
<div> <div className="mt-3">
<div className="mb-2 flex items-start gap-2"> <div className="mb-2 flex items-start gap-2">
<FontAwesomeIcon icon={faCheck} className="mt-1 text-primary" /> <FontAwesomeIcon icon={faCheck} className="mt-1 text-primary" />
<p className="font-medium">Benefits:</p> <p className="font-medium">Benefits:</p>
@@ -128,8 +131,8 @@ export const UpgradePrivilegeSystemModal = ({ isOpen, onOpenChange }: Props) =>
</div> </div>
<p className="mb-3 ml-7 text-mineshaft-100"> <p className="mb-3 ml-7 text-mineshaft-100">
Once upgraded, your organization <span className="font-bold">cannot</span> revert to Once upgraded, your organization <span className="font-bold">cannot</span> revert to
the legacy privilege system. Please ensure you've completed all preparations before the legacy privilege system. Please ensure you&apos;ve completed all preparations
proceeding. before proceeding.
</p> </p>
</div> </div>