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
@@ -69,7 +69,7 @@ export const identityProjectAdditionalPrivilegeServiceFactory = ({
projectId: identityProjectMembership.projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ActionProjectType.Any
actionProjectType: ActionProjectType.Any
});
ForbiddenError.from(permission).throwUnlessCan(
ProjectPermissionActions.Edit,
@@ -82,7 +82,7 @@ export const identityProjectAdditionalPrivilegeServiceFactory = ({
projectId: identityProjectMembership.projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ActionProjectType.Any
actionProjectType: ActionProjectType.Any
});
// we need to validate that the privilege given is not higher than the assigning users permission
@@ -152,7 +152,7 @@ export const identityProjectAdditionalPrivilegeServiceFactory = ({
projectId: identityProjectMembership.projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ActionProjectType.Any
actionProjectType: ActionProjectType.Any
});
ForbiddenError.from(permission).throwUnlessCan(
@@ -166,7 +166,7 @@ export const identityProjectAdditionalPrivilegeServiceFactory = ({
projectId: identityProjectMembership.projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ActionProjectType.Any
actionProjectType: ActionProjectType.Any
});
// we need to validate that the privilege given is not higher than the assigning users permission
@@ -253,7 +253,7 @@ export const identityProjectAdditionalPrivilegeServiceFactory = ({
projectId: identityProjectMembership.projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ActionProjectType.Any
actionProjectType: ActionProjectType.Any
});
ForbiddenError.from(permission).throwUnlessCan(
ProjectPermissionActions.Edit,
@@ -266,7 +266,7 @@ export const identityProjectAdditionalPrivilegeServiceFactory = ({
projectId: identityProjectMembership.projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ActionProjectType.Any
actionProjectType: ActionProjectType.Any
});
const hasRequiredPriviledges = isAtLeastAsPrivileged(permission, identityRolePermission);
if (!hasRequiredPriviledges)
@@ -312,7 +312,7 @@ export const identityProjectAdditionalPrivilegeServiceFactory = ({
projectId: identityProjectMembership.projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ActionProjectType.Any
actionProjectType: ActionProjectType.Any
});
ForbiddenError.from(permission).throwUnlessCan(
ProjectPermissionActions.Read,
@@ -355,7 +355,7 @@ export const identityProjectAdditionalPrivilegeServiceFactory = ({
projectId: identityProjectMembership.projectId,
actorAuthMethod,
actorOrgId,
projectOperationType: ActionProjectType.Any
actionProjectType: ActionProjectType.Any
});
ForbiddenError.from(permission).throwUnlessCan(