mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
review fixes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { ProjectType } from "@app/db/schemas";
|
||||
import {
|
||||
TCreateProjectTemplateDTO,
|
||||
TUpdateProjectTemplateDTO
|
||||
@@ -2912,22 +2913,55 @@ interface MicrosoftTeamsWorkflowIntegrationUpdateEvent {
|
||||
|
||||
interface OrgUpdateEvent {
|
||||
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 {
|
||||
type: EventType.CREATE_PROJECT;
|
||||
metadata: Record<string, string | boolean | object | number | null>; // The creation parameters
|
||||
metadata: {
|
||||
projectName: string;
|
||||
slug?: string;
|
||||
type: ProjectType;
|
||||
};
|
||||
}
|
||||
|
||||
interface ProjectUpdateEvent {
|
||||
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 {
|
||||
type: EventType.DELETE_PROJECT;
|
||||
metadata: Record<string, string>;
|
||||
metadata: {
|
||||
projectId: string;
|
||||
projectName: string;
|
||||
};
|
||||
}
|
||||
|
||||
export type Event =
|
||||
|
||||
@@ -26,8 +26,8 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({
|
||||
customRateLimits: false,
|
||||
customAlerts: false,
|
||||
secretAccessInsights: false,
|
||||
auditLogs: false,
|
||||
auditLogsRetentionDays: 0,
|
||||
auditLogs: true,
|
||||
auditLogsRetentionDays: 3,
|
||||
auditLogStreams: false,
|
||||
auditLogStreamLimit: 3,
|
||||
samlSSO: false,
|
||||
|
||||
@@ -270,7 +270,10 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: req.params.workspaceId,
|
||||
event: {
|
||||
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,
|
||||
event: {
|
||||
type: EventType.UPDATE_PROJECT,
|
||||
metadata: {
|
||||
name: req.body.name
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
@@ -406,14 +407,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: req.params.workspaceId,
|
||||
event: {
|
||||
type: EventType.UPDATE_PROJECT,
|
||||
metadata: {
|
||||
...(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 })
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
@@ -460,9 +454,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: req.params.workspaceId,
|
||||
event: {
|
||||
type: EventType.UPDATE_PROJECT,
|
||||
metadata: {
|
||||
autoCapitalization: req.body.autoCapitalization
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
@@ -510,9 +502,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: req.params.workspaceId,
|
||||
event: {
|
||||
type: EventType.UPDATE_PROJECT,
|
||||
metadata: {
|
||||
hasDeleteProtection: req.body.hasDeleteProtection
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
@@ -560,9 +550,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: workspace.id,
|
||||
event: {
|
||||
type: EventType.UPDATE_PROJECT,
|
||||
metadata: {
|
||||
pitVersionLimit: req.body.pitVersionLimit
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
@@ -610,9 +598,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: workspace.id,
|
||||
event: {
|
||||
type: EventType.UPDATE_PROJECT,
|
||||
metadata: {
|
||||
auditLogsRetentionDays: req.body.auditLogsRetentionDays
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -212,21 +212,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: project.id,
|
||||
event: {
|
||||
type: EventType.CREATE_PROJECT,
|
||||
metadata: {
|
||||
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
|
||||
})
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
@@ -278,7 +264,10 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
|
||||
projectId: project.id,
|
||||
event: {
|
||||
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,
|
||||
event: {
|
||||
type: EventType.UPDATE_PROJECT,
|
||||
metadata: {
|
||||
...(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 })
|
||||
}
|
||||
metadata: req.body
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import axios from "axios";
|
||||
|
||||
import { createNotification } from "@app/components/notifications";
|
||||
import { Switch } from "@app/components/v2";
|
||||
import { useOrganization } from "@app/context";
|
||||
import { useUpdateOrg } from "@app/hooks/api";
|
||||
import axios from "axios";
|
||||
import { createNotification } from "@app/components/notifications";
|
||||
|
||||
export const OrgProductSelectSection = () => {
|
||||
const [toggledProducts, setToggledProducts] = useState<{
|
||||
|
||||
@@ -4,13 +4,13 @@ import { ProjectType, ProjectVersion } from "@app/hooks/api/workspace/types";
|
||||
|
||||
import { AuditLogsRetentionSection } from "../AuditLogsRetentionSection";
|
||||
import { AutoCapitalizationSection } from "../AutoCapitalizationSection";
|
||||
import { SecretSharingSection } from "../SecretSharingSection";
|
||||
import { BackfillSecretReferenceSecretion } from "../BackfillSecretReferenceSection";
|
||||
import { DeleteProjectProtection } from "../DeleteProjectProtection";
|
||||
import { DeleteProjectSection } from "../DeleteProjectSection";
|
||||
import { EnvironmentSection } from "../EnvironmentSection";
|
||||
import { PointInTimeVersionLimitSection } from "../PointInTimeVersionLimitSection";
|
||||
import { RebuildSecretIndicesSection } from "../RebuildSecretIndicesSection/RebuildSecretIndicesSection";
|
||||
import { SecretSharingSection } from "../SecretSharingSection";
|
||||
import { SecretTagsSection } from "../SecretTagsSection";
|
||||
|
||||
export const ProjectGeneralTab = () => {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { useState } from "react";
|
||||
|
||||
import { createNotification } from "@app/components/notifications";
|
||||
import { ProjectPermissionCan } from "@app/components/permissions";
|
||||
import { Checkbox } from "@app/components/v2";
|
||||
import { ProjectPermissionActions, ProjectPermissionSub, useWorkspace } from "@app/context";
|
||||
import { useUpdateProject } from "@app/hooks/api/workspace/queries";
|
||||
import { useState } from "react";
|
||||
|
||||
export const SecretSharingSection = () => {
|
||||
const { currentWorkspace } = useWorkspace();
|
||||
|
||||
Reference in New Issue
Block a user