mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 04:27:38 +00:00
misc: addressed comments
This commit is contained in:
+1
-1
@@ -64,7 +64,7 @@ export const UpgradePrivilegeSystemModal = ({ isOpen, onOpenChange }: Props) =>
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal isOpen={isOpen} onOpenChange={onOpenChange}>
|
<Modal isOpen={isOpen} onOpenChange={onOpenChange}>
|
||||||
<ModalContent title="Privilege Management System Upgrade">
|
<ModalContent title="Privilege Management System Upgrade" className="max-w-2xl">
|
||||||
<div className="mb-4">
|
<div className="mb-4">
|
||||||
<h4 className="mb-2 text-lg font-semibold">
|
<h4 className="mb-2 text-lg font-semibold">
|
||||||
Introducing Permission-Based Privilege Management
|
Introducing Permission-Based Privilege Management
|
||||||
|
|||||||
@@ -3,8 +3,7 @@ import { useTranslation } from "react-i18next";
|
|||||||
import { useNavigate, useSearch } from "@tanstack/react-router";
|
import { useNavigate, useSearch } from "@tanstack/react-router";
|
||||||
|
|
||||||
import { PageHeader, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
import { PageHeader, Tab, TabList, TabPanel, Tabs } from "@app/components/v2";
|
||||||
import { ProjectPermissionActions, ProjectPermissionSub, useWorkspace } from "@app/context";
|
import { useWorkspace } from "@app/context";
|
||||||
import { withProjectPermission } from "@app/hoc";
|
|
||||||
import { ProjectType } from "@app/hooks/api/workspace/types";
|
import { ProjectType } from "@app/hooks/api/workspace/types";
|
||||||
import { ProjectAccessControlTabs } from "@app/types/project";
|
import { ProjectAccessControlTabs } from "@app/types/project";
|
||||||
|
|
||||||
@@ -16,8 +15,7 @@ import {
|
|||||||
ServiceTokenTab
|
ServiceTokenTab
|
||||||
} from "./components";
|
} from "./components";
|
||||||
|
|
||||||
const Page = withProjectPermission(
|
const Page = () => {
|
||||||
() => {
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const { currentWorkspace } = useWorkspace();
|
const { currentWorkspace } = useWorkspace();
|
||||||
const selectedTab = useSearch({
|
const selectedTab = useSearch({
|
||||||
@@ -77,12 +75,7 @@ const Page = withProjectPermission(
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
};
|
||||||
{
|
|
||||||
action: ProjectPermissionActions.Read,
|
|
||||||
subject: ProjectPermissionSub.Member
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
export const AccessControlPage = () => {
|
export const AccessControlPage = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
|
import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context";
|
||||||
|
import { withProjectPermission } from "@app/hoc";
|
||||||
|
|
||||||
import { GroupsSection } from "./components";
|
import { GroupsSection } from "./components";
|
||||||
|
|
||||||
export const GroupsTab = () => {
|
export const GroupsTab = withProjectPermission(
|
||||||
|
() => {
|
||||||
return (
|
return (
|
||||||
<motion.div
|
<motion.div
|
||||||
key="panel-groups"
|
key="panel-groups"
|
||||||
@@ -14,4 +18,9 @@ export const GroupsTab = () => {
|
|||||||
<GroupsSection />
|
<GroupsSection />
|
||||||
</motion.div>
|
</motion.div>
|
||||||
);
|
);
|
||||||
};
|
},
|
||||||
|
{
|
||||||
|
action: ProjectPermissionActions.Read,
|
||||||
|
subject: ProjectPermissionSub.Groups
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
import { motion } from "framer-motion";
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
|
import { ProjectPermissionActions, ProjectPermissionSub } from "@app/context";
|
||||||
|
import { withProjectPermission } from "@app/hoc";
|
||||||
|
|
||||||
import { MembersSection } from "./components";
|
import { MembersSection } from "./components";
|
||||||
|
|
||||||
export const MembersTab = () => {
|
export const MembersTab = withProjectPermission(
|
||||||
|
() => {
|
||||||
return (
|
return (
|
||||||
<motion.div
|
<motion.div
|
||||||
key="panel-project-members"
|
key="panel-project-members"
|
||||||
@@ -14,4 +18,9 @@ export const MembersTab = () => {
|
|||||||
<MembersSection />
|
<MembersSection />
|
||||||
</motion.div>
|
</motion.div>
|
||||||
);
|
);
|
||||||
};
|
},
|
||||||
|
{
|
||||||
|
action: ProjectPermissionActions.Read,
|
||||||
|
subject: ProjectPermissionSub.Member
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user