Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
Moved audit logs to org-level entirely
Daniel Hougaard0f70c3ea9a90
diff --git a/frontend/src/views/Org/AuditLogsPage/AuditLogsPage.tsx b/frontend/src/views/Org/AuditLogsPage/AuditLogsPage.tsxindex 239ec7ff7f..2b6ec67447 100644--- a/frontend/src/views/Org/AuditLogsPage/AuditLogsPage.tsx+++ b/frontend/src/views/Org/AuditLogsPage/AuditLogsPage.tsx@@ -1,6 +1,7 @@import { OrgPermissionActions, OrgPermissionSubjects } from "@app/context";import { withPermission } from "@app/hoc";-import { LogsSection } from "@app/views/Project/AuditLogsPage/components";++import { LogsSection } from "./components";export const AuditLogsPage = withPermission(() => {@@ -16,5 +17,5 @@ export const AuditLogsPage = withPermission(</div>);},- { action: OrgPermissionActions.Read, subject: OrgPermissionSubjects.Member } // TODO(Daniel): Create a permission for org audit logs+ { action: OrgPermissionActions.Read, subject: OrgPermissionSubjects.AuditLogs });diff --git a/frontend/src/views/Project/AuditLogsPage/components/LogsFilter.tsx b/frontend/src/views/Org/AuditLogsPage/components/LogsFilter.tsxsimilarity index 94%rename from frontend/src/views/Project/AuditLogsPage/components/LogsFilter.tsxrename to frontend/src/views/Org/AuditLogsPage/components/LogsFilter.tsxindex ba1b91a85f..cf00c9b0a8 100644--- a/frontend/src/views/Project/AuditLogsPage/components/LogsFilter.tsx+++ b/frontend/src/views/Org/AuditLogsPage/components/LogsFilter.tsx@@ -199,7 +199,7 @@ export const LogsFilter = ({<Controllercontrol={control}name="userAgentType"- render={({ field: { onChange, ...field }, fieldState: { error } }) => (+ render={({ field: { onChange, value, ...field }, fieldState: { error } }) => (<FormControllabel="Source"errorText={error?.message}@@ -207,7 +207,7 @@ export const LogsFilter = ({className="w-40"><Select- {...(field.value ? { value: field.value } : { placeholder: "All sources" })}+ value={value === undefined ? "all" : value}{...field}onValueChange={(e) => {if (e === "all") onChange(undefined);@@ -215,14 +215,14 @@ export const LogsFilter = ({}}className={twMerge("w-full border border-mineshaft-500 bg-mineshaft-700 text-mineshaft-100",- (field.value === "all" || field.value === undefined) && "text-mineshaft-400"+ value === undefined && "text-mineshaft-400")}><SelectItem value="all" key="all">All sources</SelectItem>- {userAgentTypes.map(({ label, value }) => (- <SelectItem value={String(value || "")} key={label}>+ {userAgentTypes.map(({ label, value: userAgent }) => (+ <SelectItem value={userAgent} key={label}>{label}</SelectItem>))}@@ -235,7 +235,7 @@ export const LogsFilter = ({<Controllercontrol={control}name="projectId"- render={({ field: { onChange, ...field }, fieldState: { error } }) => (+ render={({ field: { onChange, value, ...field }, fieldState: { error } }) => (<FormControllabel="Project"errorText={error?.message}@@ -243,7 +243,7 @@ export const LogsFilter = ({className="w-40"><Select- {...(field.value ? { value: field.value } : { placeholder: "All projects" })}+ value={value === undefined ? "all" : value}{...field}onValueChange={(e) => {if (e === "all") onChange(undefined);@@ -251,7 +251,7 @@ export const LogsFilter = ({}}className={twMerge("w-full border border-mineshaft-500 bg-mineshaft-700 text-mineshaft-100",- (field.value === "all" || field.value === undefined) && "text-mineshaft-400"+ value === undefined && "text-mineshaft-400")}><SelectItem value="all" key="all">diff --git a/frontend/src/views/Project/AuditLogsPage/components/LogsSection.tsx b/frontend/src/views/Org/AuditLogsPage/components/LogsSection.tsxsimilarity index 99%rename from frontend/src/views/Project/AuditLogsPage/components/LogsSection.tsxrename to frontend/src/views/Org/AuditLogsPage/components/LogsSection.tsxindex 83ae4d1df7..a184b0f5c0 100644--- a/frontend/src/views/Project/AuditLogsPage/components/LogsSection.tsx+++ b/frontend/src/views/Org/AuditLogsPage/components/LogsSection.tsx@@ -47,6 +47,7 @@ export const LogsSection = ({const { control, reset, watch } = useForm<AuditLogFilterFormData>({resolver: yupResolver(auditLogFilterFormSchema),defaultValues: {+ projectId: undefined,actor: presets?.actorId,eventType: presets?.eventType || [],page: 1,diff --git a/frontend/src/views/Project/AuditLogsPage/components/LogsTable.tsx b/frontend/src/views/Org/AuditLogsPage/components/LogsTable.tsxsimilarity index 100%rename from frontend/src/views/Project/AuditLogsPage/components/LogsTable.tsxrename to frontend/src/views/Org/AuditLogsPage/components/LogsTable.tsxdiff --git a/frontend/src/views/Project/AuditLogsPage/components/LogsTableRow.tsx b/frontend/src/views/Org/AuditLogsPage/components/LogsTableRow.tsxsimilarity index 100%rename from frontend/src/views/Project/AuditLogsPage/components/LogsTableRow.tsxrename to frontend/src/views/Org/AuditLogsPage/components/LogsTableRow.tsxdiff --git a/frontend/src/views/Project/AuditLogsPage/components/index.tsx b/frontend/src/views/Org/AuditLogsPage/components/index.tsxsimilarity index 100%rename from frontend/src/views/Project/AuditLogsPage/components/index.tsxrename to frontend/src/views/Org/AuditLogsPage/components/index.tsxdiff --git a/frontend/src/views/Project/AuditLogsPage/components/types.tsx b/frontend/src/views/Org/AuditLogsPage/components/types.tsxsimilarity index 100%rename from frontend/src/views/Project/AuditLogsPage/components/types.tsxrename to frontend/src/views/Org/AuditLogsPage/components/types.tsxdiff --git a/frontend/src/views/Project/AuditLogsPage/AuditLogsPage.tsx b/frontend/src/views/Project/AuditLogsPage/AuditLogsPage.tsxdeleted file mode 100644index e9b8504a2c..0000000000--- a/frontend/src/views/Project/AuditLogsPage/AuditLogsPage.tsx+++ /dev/null@@ -1,21 +0,0 @@-import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context";-import { withProjectPermission } from "@app/hoc";--import { LogsSection } from "./components";--export const AuditLogsPage = withProjectPermission(- () => {- return (- <div className="flex h-full w-full justify-center bg-bunker-800 text-white">- <div className="w-full max-w-7xl px-6">- <div className="sticky top-0 z-10 bg-bunker-800 py-6">- <p className="text-3xl font-semibold text-gray-200">Audit Logs</p>- <div />- </div>- <LogsSection showFilters />- </div>- </div>- );- },- { action: ProjectPermissionActions.Read, subject: ProjectPermissionSub.AuditLogs }-);diff --git a/frontend/src/views/Project/AuditLogsPage/index.tsx b/frontend/src/views/Project/AuditLogsPage/index.tsxdeleted file mode 100644index 3864b14353..0000000000--- a/frontend/src/views/Project/AuditLogsPage/index.tsx+++ /dev/null@@ -1 +0,0 @@-export { AuditLogsPage } from "./AuditLogsPage";