mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 10:35:17 +00:00
feat: fix project query by slug (now accepts an org ID)
This commit is contained in:
@@ -312,8 +312,8 @@ export const projectServiceFactory = ({
|
||||
return results;
|
||||
};
|
||||
|
||||
const deleteProject = async ({ actor, actorId, actorOrgId, filter, filterType }: TDeleteProjectDTO) => {
|
||||
const project = await projectDAL.findProjectByFilter(filter, filterType);
|
||||
const deleteProject = async ({ actor, actorId, actorOrgId, filter }: TDeleteProjectDTO) => {
|
||||
const project = await projectDAL.findProjectByFilter(filter);
|
||||
|
||||
const { permission } = await permissionService.getProjectPermission(actor, actorId, project.id, actorOrgId);
|
||||
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Delete, ProjectPermissionSub.Project);
|
||||
@@ -338,15 +338,15 @@ export const projectServiceFactory = ({
|
||||
return workspaces;
|
||||
};
|
||||
|
||||
const getAProject = async ({ actorId, actorOrgId, filter, filterType, actor }: TGetProjectDTO) => {
|
||||
const project = await projectDAL.findProjectByFilter(filter, filterType);
|
||||
const getAProject = async ({ actorId, actorOrgId, filter, actor }: TGetProjectDTO) => {
|
||||
const project = await projectDAL.findProjectByFilter(filter);
|
||||
|
||||
await permissionService.getProjectPermission(actor, actorId, project.id, actorOrgId);
|
||||
return project;
|
||||
};
|
||||
|
||||
const updateProject = async ({ actor, actorId, actorOrgId, update, filter, filterType }: TUpdateProjectDTO) => {
|
||||
const project = await projectDAL.findProjectByFilter(filter, filterType);
|
||||
const updateProject = async ({ actor, actorId, actorOrgId, update, filter }: TUpdateProjectDTO) => {
|
||||
const project = await projectDAL.findProjectByFilter(filter);
|
||||
|
||||
const { permission } = await permissionService.getProjectPermission(actor, actorId, project.id, actorOrgId);
|
||||
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Edit, ProjectPermissionSub.Settings);
|
||||
|
||||
Reference in New Issue
Block a user