mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-04 09:26:14 +00:00
Fix: Rebase errors
This commit is contained in:
@@ -358,27 +358,6 @@ export const projectServiceFactory = ({
|
|||||||
return deletedProject;
|
return deletedProject;
|
||||||
};
|
};
|
||||||
|
|
||||||
const deleteProjectBySlug = async ({ actor, actorId, actorOrgId, slug }: TDeleteProjectBySlugDTO) => {
|
|
||||||
const project = await projectDAL.findOne({ slug });
|
|
||||||
|
|
||||||
const { permission } = await permissionService.getProjectPermission(actor, actorId, project.id, actorOrgId);
|
|
||||||
ForbiddenError.from(permission).throwUnlessCan(ProjectPermissionActions.Delete, ProjectPermissionSub.Project);
|
|
||||||
|
|
||||||
const deletedProject = await projectDAL.transaction(async (tx) => {
|
|
||||||
const delProject = await projectDAL.deleteById(project.id, tx);
|
|
||||||
const projectGhostUser = await projectMembershipDAL.findProjectGhostUser(project.id).catch(() => null);
|
|
||||||
|
|
||||||
// Delete the org membership for the ghost user if it's found.
|
|
||||||
if (projectGhostUser) {
|
|
||||||
await userDAL.deleteById(projectGhostUser.id, tx);
|
|
||||||
}
|
|
||||||
|
|
||||||
return delProject;
|
|
||||||
});
|
|
||||||
|
|
||||||
return deletedProject;
|
|
||||||
};
|
|
||||||
|
|
||||||
const getProjects = async (actorId: string) => {
|
const getProjects = async (actorId: string) => {
|
||||||
const workspaces = await projectDAL.findAllProjects(actorId);
|
const workspaces = await projectDAL.findAllProjects(actorId);
|
||||||
return workspaces;
|
return workspaces;
|
||||||
|
|||||||
@@ -36,13 +36,6 @@ export type TDeleteProjectBySlugDTO = {
|
|||||||
actorOrgId?: string;
|
actorOrgId?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TDeleteProjectBySlugDTO = {
|
|
||||||
slug: string;
|
|
||||||
actor: ActorType;
|
|
||||||
actorId: string;
|
|
||||||
actorOrgId?: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type TGetProjectDTO = {
|
export type TGetProjectDTO = {
|
||||||
filter: Filter;
|
filter: Filter;
|
||||||
} & Omit<TProjectPermission, "projectId">;
|
} & Omit<TProjectPermission, "projectId">;
|
||||||
@@ -54,13 +47,6 @@ export type TUpdateProjectNameDTO = {
|
|||||||
name: string;
|
name: string;
|
||||||
} & TProjectPermission;
|
} & TProjectPermission;
|
||||||
|
|
||||||
export type TToggleProjectAutoCapitalizationDTO = {
|
|
||||||
autoCapitalization: boolean;
|
|
||||||
} & TProjectPermission;
|
|
||||||
export type TUpdateProjectNameDTO = {
|
|
||||||
name: string;
|
|
||||||
} & TProjectPermission;
|
|
||||||
|
|
||||||
export type TUpdateProjectDTO = {
|
export type TUpdateProjectDTO = {
|
||||||
filter: Filter;
|
filter: Filter;
|
||||||
update: {
|
update: {
|
||||||
|
|||||||
Reference in New Issue
Block a user