mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 00:27:30 +00:00
review fixes
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { ProjectType } from "@app/db/schemas";
|
||||||
import {
|
import {
|
||||||
TCreateProjectTemplateDTO,
|
TCreateProjectTemplateDTO,
|
||||||
TUpdateProjectTemplateDTO
|
TUpdateProjectTemplateDTO
|
||||||
@@ -2912,22 +2913,55 @@ interface MicrosoftTeamsWorkflowIntegrationUpdateEvent {
|
|||||||
|
|
||||||
interface OrgUpdateEvent {
|
interface OrgUpdateEvent {
|
||||||
type: EventType.UPDATE_ORG;
|
type: EventType.UPDATE_ORG;
|
||||||
metadata: Record<string, string | boolean | object | number>; // The update parameters
|
metadata: {
|
||||||
|
name?: string;
|
||||||
|
slug?: string;
|
||||||
|
authEnforced?: boolean;
|
||||||
|
scimEnabled?: boolean;
|
||||||
|
defaultMembershipRoleSlug?: string;
|
||||||
|
enforceMfa?: boolean;
|
||||||
|
selectedMfaMethod?: string;
|
||||||
|
allowSecretSharingOutsideOrganization?: boolean;
|
||||||
|
bypassOrgAuthEnabled?: boolean;
|
||||||
|
userTokenExpiration?: string;
|
||||||
|
secretsProductEnabled?: boolean;
|
||||||
|
pkiProductEnabled?: boolean;
|
||||||
|
kmsProductEnabled?: boolean;
|
||||||
|
sshProductEnabled?: boolean;
|
||||||
|
scannerProductEnabled?: boolean;
|
||||||
|
shareSecretsProductEnabled?: boolean;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ProjectCreateEvent {
|
interface ProjectCreateEvent {
|
||||||
type: EventType.CREATE_PROJECT;
|
type: EventType.CREATE_PROJECT;
|
||||||
metadata: Record<string, string | boolean | object | number | null>; // The creation parameters
|
metadata: {
|
||||||
|
projectName: string;
|
||||||
|
slug?: string;
|
||||||
|
type: ProjectType;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ProjectUpdateEvent {
|
interface ProjectUpdateEvent {
|
||||||
type: EventType.UPDATE_PROJECT;
|
type: EventType.UPDATE_PROJECT;
|
||||||
metadata: Record<string, string | boolean | object | number>; // The update parameters
|
metadata: {
|
||||||
|
name?: string;
|
||||||
|
description?: string;
|
||||||
|
autoCapitalization?: boolean;
|
||||||
|
hasDeleteProtection?: boolean;
|
||||||
|
slug?: string;
|
||||||
|
secretSharing?: boolean;
|
||||||
|
pitVersionLimit?: number;
|
||||||
|
auditLogsRetentionDays?: number;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ProjectDeleteEvent {
|
interface ProjectDeleteEvent {
|
||||||
type: EventType.DELETE_PROJECT;
|
type: EventType.DELETE_PROJECT;
|
||||||
metadata: Record<string, string>;
|
metadata: {
|
||||||
|
projectId: string;
|
||||||
|
projectName: string;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Event =
|
export type Event =
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({
|
|||||||
customRateLimits: false,
|
customRateLimits: false,
|
||||||
customAlerts: false,
|
customAlerts: false,
|
||||||
secretAccessInsights: false,
|
secretAccessInsights: false,
|
||||||
auditLogs: false,
|
auditLogs: true,
|
||||||
auditLogsRetentionDays: 0,
|
auditLogsRetentionDays: 3,
|
||||||
auditLogStreams: false,
|
auditLogStreams: false,
|
||||||
auditLogStreamLimit: 3,
|
auditLogStreamLimit: 3,
|
||||||
samlSSO: false,
|
samlSSO: false,
|
||||||
|
|||||||
@@ -270,7 +270,10 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: req.params.workspaceId,
|
projectId: req.params.workspaceId,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.DELETE_PROJECT,
|
type: EventType.DELETE_PROJECT,
|
||||||
metadata: {}
|
metadata: {
|
||||||
|
projectId: workspace.id,
|
||||||
|
projectName: workspace.name
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -315,9 +318,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: req.params.workspaceId,
|
projectId: req.params.workspaceId,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.UPDATE_PROJECT,
|
type: EventType.UPDATE_PROJECT,
|
||||||
metadata: {
|
metadata: req.body
|
||||||
name: req.body.name
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -406,14 +407,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: req.params.workspaceId,
|
projectId: req.params.workspaceId,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.UPDATE_PROJECT,
|
type: EventType.UPDATE_PROJECT,
|
||||||
metadata: {
|
metadata: req.body
|
||||||
...(req.body.name !== undefined && { name: req.body.name }),
|
|
||||||
...(req.body.description !== undefined && { description: req.body.description }),
|
|
||||||
...(req.body.autoCapitalization !== undefined && { autoCapitalization: req.body.autoCapitalization }),
|
|
||||||
...(req.body.hasDeleteProtection !== undefined && { hasDeleteProtection: req.body.hasDeleteProtection }),
|
|
||||||
...(req.body.slug !== undefined && { slug: req.body.slug }),
|
|
||||||
...(req.body.secretSharing !== undefined && { secretSharing: req.body.secretSharing })
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -460,9 +454,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: req.params.workspaceId,
|
projectId: req.params.workspaceId,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.UPDATE_PROJECT,
|
type: EventType.UPDATE_PROJECT,
|
||||||
metadata: {
|
metadata: req.body
|
||||||
autoCapitalization: req.body.autoCapitalization
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -510,9 +502,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: req.params.workspaceId,
|
projectId: req.params.workspaceId,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.UPDATE_PROJECT,
|
type: EventType.UPDATE_PROJECT,
|
||||||
metadata: {
|
metadata: req.body
|
||||||
hasDeleteProtection: req.body.hasDeleteProtection
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -560,9 +550,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: workspace.id,
|
projectId: workspace.id,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.UPDATE_PROJECT,
|
type: EventType.UPDATE_PROJECT,
|
||||||
metadata: {
|
metadata: req.body
|
||||||
pitVersionLimit: req.body.pitVersionLimit
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -610,9 +598,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: workspace.id,
|
projectId: workspace.id,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.UPDATE_PROJECT,
|
type: EventType.UPDATE_PROJECT,
|
||||||
metadata: {
|
metadata: req.body
|
||||||
auditLogsRetentionDays: req.body.auditLogsRetentionDays
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -212,21 +212,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: project.id,
|
projectId: project.id,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.CREATE_PROJECT,
|
type: EventType.CREATE_PROJECT,
|
||||||
metadata: {
|
metadata: req.body
|
||||||
actorId: req.permission.id,
|
|
||||||
actor: req.permission.type,
|
|
||||||
actorOrgId: req.permission.orgId,
|
|
||||||
actorAuthMethod: req.permission.authMethod,
|
|
||||||
...(req.body.projectName !== undefined && { workspaceName: req.body.projectName }),
|
|
||||||
...(req.body.projectDescription !== undefined && { workspaceDescription: req.body.projectDescription }),
|
|
||||||
...(req.body.slug !== undefined && { slug: req.body.slug }),
|
|
||||||
...(req.body.kmsKeyId !== undefined && { kmsKeyId: req.body.kmsKeyId }),
|
|
||||||
...(req.body.template !== undefined && { template: req.body.template }),
|
|
||||||
...(req.body.type !== undefined && { type: req.body.type }),
|
|
||||||
...(req.body.shouldCreateDefaultEnvs !== undefined && {
|
|
||||||
createDefaultEnvs: req.body.shouldCreateDefaultEnvs
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -278,7 +264,10 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: project.id,
|
projectId: project.id,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.DELETE_PROJECT,
|
type: EventType.DELETE_PROJECT,
|
||||||
metadata: {}
|
metadata: {
|
||||||
|
projectId: project.id,
|
||||||
|
projectName: project.name
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -367,12 +356,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
|||||||
projectId: project.id,
|
projectId: project.id,
|
||||||
event: {
|
event: {
|
||||||
type: EventType.UPDATE_PROJECT,
|
type: EventType.UPDATE_PROJECT,
|
||||||
metadata: {
|
metadata: req.body
|
||||||
...(req.body.name !== undefined && { name: req.body.name }),
|
|
||||||
...(req.body.description !== undefined && { description: req.body.description }),
|
|
||||||
...(req.body.autoCapitalization !== undefined && { autoCapitalization: req.body.autoCapitalization }),
|
|
||||||
...(req.body.hasDeleteProtection !== undefined && { hasDeleteProtection: req.body.hasDeleteProtection })
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,10 +1,10 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
import axios from "axios";
|
||||||
|
|
||||||
|
import { createNotification } from "@app/components/notifications";
|
||||||
import { Switch } from "@app/components/v2";
|
import { Switch } from "@app/components/v2";
|
||||||
import { useOrganization } from "@app/context";
|
import { useOrganization } from "@app/context";
|
||||||
import { useUpdateOrg } from "@app/hooks/api";
|
import { useUpdateOrg } from "@app/hooks/api";
|
||||||
import axios from "axios";
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
|
||||||
|
|
||||||
export const OrgProductSelectSection = () => {
|
export const OrgProductSelectSection = () => {
|
||||||
const [toggledProducts, setToggledProducts] = useState<{
|
const [toggledProducts, setToggledProducts] = useState<{
|
||||||
|
|||||||
+1
-1
@@ -4,13 +4,13 @@ import { ProjectType, ProjectVersion } from "@app/hooks/api/workspace/types";
|
|||||||
|
|
||||||
import { AuditLogsRetentionSection } from "../AuditLogsRetentionSection";
|
import { AuditLogsRetentionSection } from "../AuditLogsRetentionSection";
|
||||||
import { AutoCapitalizationSection } from "../AutoCapitalizationSection";
|
import { AutoCapitalizationSection } from "../AutoCapitalizationSection";
|
||||||
import { SecretSharingSection } from "../SecretSharingSection";
|
|
||||||
import { BackfillSecretReferenceSecretion } from "../BackfillSecretReferenceSection";
|
import { BackfillSecretReferenceSecretion } from "../BackfillSecretReferenceSection";
|
||||||
import { DeleteProjectProtection } from "../DeleteProjectProtection";
|
import { DeleteProjectProtection } from "../DeleteProjectProtection";
|
||||||
import { DeleteProjectSection } from "../DeleteProjectSection";
|
import { DeleteProjectSection } from "../DeleteProjectSection";
|
||||||
import { EnvironmentSection } from "../EnvironmentSection";
|
import { EnvironmentSection } from "../EnvironmentSection";
|
||||||
import { PointInTimeVersionLimitSection } from "../PointInTimeVersionLimitSection";
|
import { PointInTimeVersionLimitSection } from "../PointInTimeVersionLimitSection";
|
||||||
import { RebuildSecretIndicesSection } from "../RebuildSecretIndicesSection/RebuildSecretIndicesSection";
|
import { RebuildSecretIndicesSection } from "../RebuildSecretIndicesSection/RebuildSecretIndicesSection";
|
||||||
|
import { SecretSharingSection } from "../SecretSharingSection";
|
||||||
import { SecretTagsSection } from "../SecretTagsSection";
|
import { SecretTagsSection } from "../SecretTagsSection";
|
||||||
|
|
||||||
export const ProjectGeneralTab = () => {
|
export const ProjectGeneralTab = () => {
|
||||||
|
|||||||
+2
-1
@@ -1,9 +1,10 @@
|
|||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
import { createNotification } from "@app/components/notifications";
|
import { createNotification } from "@app/components/notifications";
|
||||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||||
import { Checkbox } from "@app/components/v2";
|
import { Checkbox } from "@app/components/v2";
|
||||||
import { ProjectPermissionActions, ProjectPermissionSub, useWorkspace } from "@app/context";
|
import { ProjectPermissionActions, ProjectPermissionSub, useWorkspace } from "@app/context";
|
||||||
import { useUpdateProject } from "@app/hooks/api/workspace/queries";
|
import { useUpdateProject } from "@app/hooks/api/workspace/queries";
|
||||||
import { useState } from "react";
|
|
||||||
|
|
||||||
export const SecretSharingSection = () => {
|
export const SecretSharingSection = () => {
|
||||||
const { currentWorkspace } = useWorkspace();
|
const { currentWorkspace } = useWorkspace();
|
||||||
|
|||||||
Reference in New Issue
Block a user