mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 18:27:36 +00:00
Draft
This commit is contained in:
@@ -33,7 +33,7 @@ export const getDefaultOnPremFeatures = (): TFeatureSet => ({
|
|||||||
status: null,
|
status: null,
|
||||||
trial_end: null,
|
trial_end: null,
|
||||||
has_used_trial: true,
|
has_used_trial: true,
|
||||||
secretApproval: false,
|
secretApproval: true,
|
||||||
secretRotation: true
|
secretRotation: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
|
interface IProps {
|
||||||
|
className?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const Divider = ({ className }: IProps): JSX.Element => {
|
||||||
|
return (
|
||||||
|
<div className={twMerge("flex items-center px-2 opacity-50", className)}>
|
||||||
|
<div aria-hidden="true" className="h-5 w-full grow border border-t border-mineshaft-200" />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Divider;
|
||||||
@@ -3,6 +3,8 @@ import { faLock } from "@fortawesome/free-solid-svg-icons";
|
|||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
import { twMerge } from "tailwind-merge";
|
import { twMerge } from "tailwind-merge";
|
||||||
|
|
||||||
|
import { Button } from "../v2";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
containerClassName?: string;
|
containerClassName?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
@@ -17,24 +19,24 @@ export const PermissionDeniedBanner = ({ containerClassName, className, children
|
|||||||
containerClassName
|
containerClassName
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div
|
<div className={twMerge("rounded-md bg-mineshaft-800 p-16 text-bunker-300", className)}>
|
||||||
className={twMerge(
|
<div className="flex items-end space-x-12">
|
||||||
"flex items-end space-x-12 rounded-md bg-mineshaft-800 p-16 text-bunker-300",
|
<div>
|
||||||
className
|
<FontAwesomeIcon icon={faLock} size="6x" />
|
||||||
)}
|
</div>
|
||||||
>
|
<div>
|
||||||
<div>
|
<div className="mb-2 text-4xl font-medium">Access Restricted</div>
|
||||||
<FontAwesomeIcon icon={faLock} size="6x" />
|
{children || (
|
||||||
</div>
|
<div className="text-sm">
|
||||||
<div>
|
Your role has limited permissions, please <br /> contact your administrator to gain
|
||||||
<div className="mb-2 text-4xl font-medium">Access Restricted</div>
|
access
|
||||||
{children || (
|
</div>
|
||||||
<div className="text-sm">
|
)}
|
||||||
Your role has limited permissions, please <br /> contact your administrator to gain
|
</div>
|
||||||
access
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
</div>
|
||||||
|
<Button className="mt-3 ml-[7.5rem]" size="xs">
|
||||||
|
Request access
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -554,7 +554,7 @@ export const AppLayout = ({ children }: LayoutProps) => {
|
|||||||
}
|
}
|
||||||
icon="system-outline-189-domain-verification"
|
icon="system-outline-189-domain-verification"
|
||||||
>
|
>
|
||||||
Secret Approvals
|
Approvals
|
||||||
{Boolean(secretApprovalReqCount?.open) && (
|
{Boolean(secretApprovalReqCount?.open) && (
|
||||||
<span className="ml-2 rounded border border-primary-400 bg-primary-600 py-0.5 px-1 text-xs font-semibold text-black">
|
<span className="ml-2 rounded border border-primary-400 bg-primary-600 py-0.5 px-1 text-xs font-semibold text-black">
|
||||||
{secretApprovalReqCount?.open}
|
{secretApprovalReqCount?.open}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import Link from "next/link";
|
|||||||
import { faArrowUpRightFromSquare } from "@fortawesome/free-solid-svg-icons";
|
import { faArrowUpRightFromSquare } from "@fortawesome/free-solid-svg-icons";
|
||||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
||||||
|
|
||||||
|
import Divider from "@app/components/basic/Divider";
|
||||||
import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
import { Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
||||||
import { useWorkspace } from "@app/context";
|
import { useWorkspace } from "@app/context";
|
||||||
|
|
||||||
@@ -9,8 +10,10 @@ import { SecretApprovalPolicyList } from "./components/SecretApprovalPolicyList"
|
|||||||
import { SecretApprovalRequest } from "./components/SecretApprovalRequest";
|
import { SecretApprovalRequest } from "./components/SecretApprovalRequest";
|
||||||
|
|
||||||
enum TabSection {
|
enum TabSection {
|
||||||
ApprovalRequests = "approval-requests",
|
SecretApprovalRequests = "approval-requests",
|
||||||
Rules = "approval-rules"
|
SecretPolicies = "approval-rules",
|
||||||
|
ResourcePolicies = "resource-rules",
|
||||||
|
ResourceApprovalRequests = "resource-requests"
|
||||||
}
|
}
|
||||||
|
|
||||||
export const SecretApprovalPage = () => {
|
export const SecretApprovalPage = () => {
|
||||||
@@ -21,7 +24,7 @@ export const SecretApprovalPage = () => {
|
|||||||
<div className="container mx-auto h-full w-full max-w-7xl bg-bunker-800 px-6 text-white">
|
<div className="container mx-auto h-full w-full max-w-7xl bg-bunker-800 px-6 text-white">
|
||||||
<div className="flex items-center justify-between py-6">
|
<div className="flex items-center justify-between py-6">
|
||||||
<div className="flex w-full flex-col">
|
<div className="flex w-full flex-col">
|
||||||
<h2 className="text-3xl font-semibold text-gray-200">Secret Approval Workflows</h2>
|
<h2 className="text-3xl font-semibold text-gray-200">Approval Workflows</h2>
|
||||||
<p className="text-bunker-300">
|
<p className="text-bunker-300">
|
||||||
Create approval policies for any modifications to secrets in sensitive environments and
|
Create approval policies for any modifications to secrets in sensitive environments and
|
||||||
folders.
|
folders.
|
||||||
@@ -39,15 +42,18 @@ export const SecretApprovalPage = () => {
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<Tabs defaultValue={TabSection.ApprovalRequests}>
|
<Tabs defaultValue={TabSection.SecretApprovalRequests}>
|
||||||
<TabList>
|
<TabList>
|
||||||
<Tab value={TabSection.ApprovalRequests}>Secret PRs</Tab>
|
<Tab value={TabSection.SecretApprovalRequests}>Secret Approvals</Tab>
|
||||||
<Tab value={TabSection.Rules}>Policies</Tab>
|
<Tab value={TabSection.SecretPolicies}>Secret Policies</Tab>
|
||||||
|
<Divider />
|
||||||
|
<Tab value={TabSection.ResourceApprovalRequests}>Resource Approvals</Tab>
|
||||||
|
<Tab value={TabSection.ResourcePolicies}>Resource Policies</Tab>
|
||||||
</TabList>
|
</TabList>
|
||||||
<TabPanel value={TabSection.ApprovalRequests}>
|
<TabPanel value={TabSection.SecretApprovalRequests}>
|
||||||
<SecretApprovalRequest />
|
<SecretApprovalRequest />
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
<TabPanel value={TabSection.Rules}>
|
<TabPanel value={TabSection.SecretPolicies}>
|
||||||
<SecretApprovalPolicyList workspaceId={workspaceId} />
|
<SecretApprovalPolicyList workspaceId={workspaceId} />
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
</Tabs>
|
</Tabs>
|
||||||
|
|||||||
Reference in New Issue
Block a user