mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 05:19:49 +00:00
misc: finalized error message
This commit is contained in:
@@ -100,7 +100,7 @@ export const groupServiceFactory = ({
|
||||
throw new ForbiddenRequestError({
|
||||
name: "PermissionBoundaryError",
|
||||
message: constructPermissionErrorMessage(
|
||||
"Failed to create a more privileged group",
|
||||
"Failed to create group",
|
||||
membership.shouldUseNewPrivilegeSystem,
|
||||
OrgPermissionGroupActions.ManagePrivileges,
|
||||
OrgPermissionSubjects.Groups
|
||||
@@ -185,7 +185,7 @@ export const groupServiceFactory = ({
|
||||
throw new ForbiddenRequestError({
|
||||
name: "PermissionBoundaryError",
|
||||
message: constructPermissionErrorMessage(
|
||||
"Failed to update a more privileged group",
|
||||
"Failed to update group",
|
||||
membership.shouldUseNewPrivilegeSystem,
|
||||
OrgPermissionGroupActions.ManagePrivileges,
|
||||
OrgPermissionSubjects.Groups
|
||||
|
||||
@@ -188,7 +188,9 @@ const constructPermissionErrorMessage = (
|
||||
opSubject: OrgPermissionSet[1] | ProjectPermissionSet[1]
|
||||
) => {
|
||||
return `${baseMessage}${
|
||||
shouldUseNewPrivilegeSystem ? `. Missing permission ${opAction as string} on ${opSubject as string}` : ""
|
||||
shouldUseNewPrivilegeSystem
|
||||
? `. Missing permission ${opAction as string} on ${opSubject as string}`
|
||||
: ". Privilege level is not high enough to perform this action"
|
||||
}`;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user