Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

misc: addressed feedback

Sheen Capadnganc387fb0e18b2
diff --git a/backend/src/services/pki-application/pki-application-service.ts b/backend/src/services/pki-application/pki-application-service.ts
index 2d4f517fe8..9d82da00cc 100644
--- a/backend/src/services/pki-application/pki-application-service.ts
+++ b/backend/src/services/pki-application/pki-application-service.ts
@@ -139,14 +139,14 @@ export const pkiApplicationServiceFactory = ({
const existing = await pkiApplicationDAL.findByNameAndProjectId(name, projectId);
if (existing) {
- throw new BadRequestError({ message: `An application with name '${name}' already exists in this project.` });
+ throw new BadRequestError({ message: `An application with name '${name}' already exists in this organization.` });
}
if (profileIds && profileIds.length > 0) {
const profilesInProject = await pkiApplicationProfileDAL.findProfilesInProject(profileIds, projectId);
if (profilesInProject.length !== profileIds.length) {
throw new BadRequestError({
- message: "One or more profileIds do not belong to this project."
+ message: "One or more profileIds do not belong to this organization."
});
}
@@ -191,7 +191,9 @@ export const pkiApplicationServiceFactory = ({
});
} catch (err) {
if (err instanceof DatabaseError && (err.error as { code?: string })?.code === "23505") {
- throw new BadRequestError({ message: `An application with name '${name}' already exists in this project.` });
+ throw new BadRequestError({
+ message: `An application with name '${name}' already exists in this organization.`
+ });
}
throw err;
}
@@ -235,7 +237,7 @@ export const pkiApplicationServiceFactory = ({
}: TGetPkiApplicationByNameDTO) => {
const application = await pkiApplicationDAL.findByNameAndProjectId(name, projectId);
if (!application) {
- throw new NotFoundError({ message: `Application with name '${name}' not found in this project.` });
+ throw new NotFoundError({ message: `Application with name '${name}' not found in this organization.` });
}
const { permission } = await $loadResourcePermission(application.id, projectId, {
@@ -343,7 +345,9 @@ export const pkiApplicationServiceFactory = ({
if (name && name !== application.name) {
const collision = await pkiApplicationDAL.findByNameAndProjectId(name, projectId);
if (collision) {
- throw new BadRequestError({ message: `An application with name '${name}' already exists in this project.` });
+ throw new BadRequestError({
+ message: `An application with name '${name}' already exists in this organization.`
+ });
}
}
@@ -354,7 +358,9 @@ export const pkiApplicationServiceFactory = ({
});
} catch (err) {
if (err instanceof DatabaseError && (err.error as { code?: string })?.code === "23505") {
- throw new BadRequestError({ message: `An application with name '${name}' already exists in this project.` });
+ throw new BadRequestError({
+ message: `An application with name '${name}' already exists in this organization.`
+ });
}
throw err;
}
@@ -468,7 +474,7 @@ export const pkiApplicationServiceFactory = ({
const profilesInProject = await pkiApplicationProfileDAL.findProfilesInProject(profileIds, projectId);
if (profilesInProject.length !== profileIds.length) {
- throw new BadRequestError({ message: "One or more profileIds do not belong to this project." });
+ throw new BadRequestError({ message: "One or more profileIds do not belong to this organization." });
}
const { permission: projectPermission } = await $loadProjectPermission(projectId, {
@@ -537,7 +543,7 @@ export const pkiApplicationServiceFactory = ({
const [profile] = await pkiApplicationProfileDAL.findProfilesInProject([profileId], projectId);
if (!profile) {
- throw new NotFoundError({ message: `Profile '${profileId}' not found in project.` });
+ throw new NotFoundError({ message: `Profile '${profileId}' not found in this organization.` });
}
const { permission: projectPermission } = await $loadProjectPermission(projectId, {
diff --git a/frontend/src/pages/cert-manager/layout.tsx b/frontend/src/pages/cert-manager/layout.tsx
index 8f8da161a4..8085b3353e 100644
--- a/frontend/src/pages/cert-manager/layout.tsx
+++ b/frontend/src/pages/cert-manager/layout.tsx
@@ -23,6 +23,11 @@ export const Route = createFileRoute(
"/_authenticate/_inject-org-details/_org-layout/organizations/$orgId/cert-manager/_cert-manager-layout"
)({
component: PkiManagerLayout,
+ // Opening a page whose search has defaults (discovery, approvals) reloads the route to add them while
+ // beforeLoad below is still pending, and the virtual parents those pages sit under (no beforeLoad of
+ // their own) keep the context from before it resolved. Context set here is synchronous, so their
+ // children still receive breadcrumbs to extend.
+ context: () => ({ breadcrumbs: [] }),
beforeLoad: async ({ params, context, location }) => {
const [instance, memberProjects] = await Promise.all([
context.queryClient.ensureQueryData({