feat: updated all permission argument to actionProjectType

This commit is contained in:
=
2025-01-14 23:41:06 +05:30
parent 6f38d6c76f
commit 3a5bb31bde
45 changed files with 310 additions and 313 deletions
@@ -60,7 +60,7 @@ export const identityProjectServiceFactory = ({
projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ActionProjectType.Any
actionProjectType: ActionProjectType.Any
});
ForbiddenError.from(permission).throwUnlessCan(
ProjectPermissionActions.Create,
@@ -166,7 +166,7 @@ export const identityProjectServiceFactory = ({
projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ActionProjectType.Any
actionProjectType: ActionProjectType.Any
});
ForbiddenError.from(permission).throwUnlessCan(
ProjectPermissionActions.Edit,
@@ -262,7 +262,7 @@ export const identityProjectServiceFactory = ({
projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ActionProjectType.Any
actionProjectType: ActionProjectType.Any
});
ForbiddenError.from(permission).throwUnlessCan(
ProjectPermissionActions.Delete,
@@ -275,7 +275,7 @@ export const identityProjectServiceFactory = ({
projectId: identityProjectMembership.projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ActionProjectType.Any
actionProjectType: ActionProjectType.Any
});
if (!isAtLeastAsPrivileged(permission, identityRolePermission))
throw new ForbiddenRequestError({ message: "Failed to delete more privileged identity" });
@@ -302,7 +302,7 @@ export const identityProjectServiceFactory = ({
projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ActionProjectType.Any
actionProjectType: ActionProjectType.Any
});
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Read, ProjectPermissionSub.Identity);
@@ -333,7 +333,7 @@ export const identityProjectServiceFactory = ({
projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ActionProjectType.Any
actionProjectType: ActionProjectType.Any
});
ForbiddenError.from(permission).throwUnlessCan(