mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-15 23:47:06 +00:00
misc: review comments
This commit is contained in:
+88
-86
@@ -1,7 +1,7 @@
|
||||
import { useState } from "react";
|
||||
import { Controller, useForm } from "react-hook-form";
|
||||
import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { z } from "zod";
|
||||
import { useState } from "react";
|
||||
|
||||
import { createNotification } from "@app/components/notifications";
|
||||
import { Button, Checkbox, Modal, ModalContent } from "@app/components/v2";
|
||||
@@ -71,94 +71,95 @@ export const UpgradePrivilegeSystemModal = ({ isOpen, onOpenChange }: Props) =>
|
||||
<Modal isOpen={isOpen} onOpenChange={handleClose}>
|
||||
<ModalContent title="Privilege Management System Upgrade" className="max-w-2xl">
|
||||
{step === "info" ? (
|
||||
<>
|
||||
<div className="mb-4">
|
||||
<p className="mb-4 text-sm text-mineshaft-300">
|
||||
We've developed an improved privilege management system that enhances how access controls work in your organization.
|
||||
</p>
|
||||
<div className="mb-4">
|
||||
<p className="mb-4 text-sm text-mineshaft-300">
|
||||
We've developed an improved privilege management system that enhances how access
|
||||
controls work in your organization.
|
||||
</p>
|
||||
|
||||
<div className="mb-4 rounded-lg border border-mineshaft-600 bg-mineshaft-800 p-4">
|
||||
<div className="mb-4 rounded-lg border border-mineshaft-600 bg-mineshaft-800 p-4">
|
||||
<div className="mb-3">
|
||||
<div className="mb-3">
|
||||
<div className="mb-3">
|
||||
<p className="mb-3 text-sm text-mineshaft-300">
|
||||
<strong>Current system: </strong>
|
||||
Users with higher privilege levels can modify access for anyone below them.
|
||||
This rigid hierarchy makes it difficult to implement precise access control policies,
|
||||
forcing you to either over-grant permissions or create complex workarounds when specialized roles (like team leads) need to manage their team's access without receiving broader administrative powers.
|
||||
</p>
|
||||
<p className="text-sm text-mineshaft-300">
|
||||
<strong>New system:</strong> Users need explicit permission to modify specific
|
||||
access levels, providing targeted control. After upgrading, you'll need to
|
||||
grant the new 'Manage Privileges' permission. At the organization level,
|
||||
this is available for the{" "}
|
||||
<a
|
||||
href="https://infisical.com/docs/internals/permissions/organization-permissions#subject%3A-groups"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="underline hover:text-bunker-200 hover:decoration-primary-700"
|
||||
>
|
||||
Group
|
||||
</a>{" "}
|
||||
and{" "}
|
||||
<a
|
||||
href="https://infisical.com/docs/internals/permissions/organization-permissions#subject%3A-identity"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="underline hover:text-bunker-200 hover:decoration-primary-700"
|
||||
>
|
||||
Identity
|
||||
</a>{" "}
|
||||
subjects while at the project level, this is available for the{" "}
|
||||
<a
|
||||
href="https://infisical.com/docs/internals/permissions/project-permissions#subject%3A-member"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="underline hover:text-bunker-200 hover:decoration-primary-700"
|
||||
>
|
||||
Member,
|
||||
</a>{" "}
|
||||
<a
|
||||
href="https://infisical.com/docs/internals/permissions/project-permissions#subject%3A-groups"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="underline hover:text-bunker-200 hover:decoration-primary-700"
|
||||
>
|
||||
Group,
|
||||
</a>{" "}
|
||||
and{" "}
|
||||
<a
|
||||
href="https://infisical.com/docs/internals/permissions/project-permissions#subject%3A-identity"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="underline hover:text-bunker-200 hover:decoration-primary-700"
|
||||
>
|
||||
Identity
|
||||
</a>{" "}
|
||||
subjects.
|
||||
</p>
|
||||
</div>
|
||||
<p className="mb-3 text-sm text-mineshaft-300">
|
||||
<strong>Current system: </strong>
|
||||
Users with higher privilege levels can modify access for anyone below them. This
|
||||
rigid hierarchy makes it difficult to implement precise access control policies,
|
||||
forcing you to either over-grant permissions or create complex workarounds when
|
||||
specialized roles (like team leads) need to manage their team's access
|
||||
without receiving broader administrative powers.
|
||||
</p>
|
||||
<p className="text-sm text-mineshaft-300">
|
||||
<strong>New system:</strong> Users need explicit permission to modify specific
|
||||
access levels, providing targeted control. After upgrading, you'll need to
|
||||
grant the new 'Grant Privileges' permission. At the organization
|
||||
level, this is available for the{" "}
|
||||
<a
|
||||
href="https://infisical.com/docs/internals/permissions/organization-permissions#subject%3A-groups"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="underline hover:text-bunker-200 hover:decoration-primary-700"
|
||||
>
|
||||
Group
|
||||
</a>{" "}
|
||||
and{" "}
|
||||
<a
|
||||
href="https://infisical.com/docs/internals/permissions/organization-permissions#subject%3A-identity"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="underline hover:text-bunker-200 hover:decoration-primary-700"
|
||||
>
|
||||
Identity
|
||||
</a>{" "}
|
||||
subjects while at the project level, this is available for the{" "}
|
||||
<a
|
||||
href="https://infisical.com/docs/internals/permissions/project-permissions#subject%3A-member"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="underline hover:text-bunker-200 hover:decoration-primary-700"
|
||||
>
|
||||
Member,
|
||||
</a>{" "}
|
||||
<a
|
||||
href="https://infisical.com/docs/internals/permissions/project-permissions#subject%3A-groups"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="underline hover:text-bunker-200 hover:decoration-primary-700"
|
||||
>
|
||||
Group,
|
||||
</a>{" "}
|
||||
and{" "}
|
||||
<a
|
||||
href="https://infisical.com/docs/internals/permissions/project-permissions#subject%3A-identity"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
className="underline hover:text-bunker-200 hover:decoration-primary-700"
|
||||
>
|
||||
Identity
|
||||
</a>{" "}
|
||||
subjects.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="mt-4 flex justify-end">
|
||||
<Button
|
||||
onClick={() => setStep("upgrade")}
|
||||
variant="solid"
|
||||
colorSchema="primary"
|
||||
size="md"
|
||||
className="w-[120px] bg-primary hover:bg-primary-600"
|
||||
>
|
||||
Continue
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
|
||||
<div className="mt-4 flex justify-end">
|
||||
<Button
|
||||
onClick={() => setStep("upgrade")}
|
||||
variant="solid"
|
||||
colorSchema="primary"
|
||||
size="md"
|
||||
className="w-[120px] bg-primary hover:bg-primary-600"
|
||||
>
|
||||
Continue
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
) : (
|
||||
<div className="mb-4">
|
||||
<p className="mb-4 text-sm text-mineshaft-300">
|
||||
Your existing access control workflows will continue to function. However, actions that
|
||||
involve modifying privileges or permissions will now use the new permission-based system,
|
||||
requiring users to have explicit permission to modify given resource.
|
||||
Your existing access control workflows will continue to function. However, actions
|
||||
that involve modifying privileges or permissions will now use the new permission-based
|
||||
system, requiring users to have explicit permission to modify given resource.
|
||||
</p>
|
||||
|
||||
<p className="mb-4 text-sm text-mineshaft-300">
|
||||
@@ -168,9 +169,9 @@ export const UpgradePrivilegeSystemModal = ({ isOpen, onOpenChange }: Props) =>
|
||||
|
||||
<div className="mb-4 rounded-lg border border-mineshaft-600 bg-mineshaft-800 p-4">
|
||||
<p className="mb-4 text-sm text-mineshaft-300">
|
||||
Once upgraded, your organization <span className="font-bold">cannot</span> revert to the
|
||||
legacy privilege system. Please ensure you've completed all preparations before
|
||||
proceeding.
|
||||
Once upgraded, your organization <span className="font-bold">cannot</span> revert to
|
||||
the legacy privilege system. Please ensure you've completed all preparations
|
||||
before proceeding.
|
||||
</p>
|
||||
|
||||
<div className="mb-4">
|
||||
@@ -233,8 +234,8 @@ export const UpgradePrivilegeSystemModal = ({ isOpen, onOpenChange }: Props) =>
|
||||
onBlur={onBlur}
|
||||
isError={Boolean(error?.message)}
|
||||
>
|
||||
I have checked Terraform configurations and API integrations for compatibility
|
||||
with the new system
|
||||
I have checked Terraform configurations and API integrations for
|
||||
compatibility with the new system
|
||||
</Checkbox>
|
||||
)}
|
||||
/>
|
||||
@@ -265,6 +266,7 @@ export const UpgradePrivilegeSystemModal = ({ isOpen, onOpenChange }: Props) =>
|
||||
<form onSubmit={handleSubmit(handlePrivilegeSystemUpgrade)}>
|
||||
<div className="mt-6 flex items-center justify-end gap-4">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setStep("info")}
|
||||
className="w-[120px] text-sm text-mineshaft-300 hover:text-mineshaft-200"
|
||||
>
|
||||
|
||||
+2
-2
@@ -44,7 +44,7 @@ const identityPermissionSchema = z
|
||||
[OrgPermissionIdentityActions.Edit]: z.boolean().optional(),
|
||||
[OrgPermissionIdentityActions.Delete]: z.boolean().optional(),
|
||||
[OrgPermissionIdentityActions.Create]: z.boolean().optional(),
|
||||
[OrgPermissionIdentityActions.ManagePrivileges]: z.boolean().optional(),
|
||||
[OrgPermissionIdentityActions.GrantPrivileges]: z.boolean().optional(),
|
||||
[OrgPermissionIdentityActions.RevokeAuth]: z.boolean().optional(),
|
||||
[OrgPermissionIdentityActions.CreateToken]: z.boolean().optional(),
|
||||
[OrgPermissionIdentityActions.GetToken]: z.boolean().optional(),
|
||||
@@ -58,7 +58,7 @@ const groupPermissionSchema = z
|
||||
[OrgPermissionGroupActions.Create]: z.boolean().optional(),
|
||||
[OrgPermissionGroupActions.Edit]: z.boolean().optional(),
|
||||
[OrgPermissionGroupActions.Delete]: z.boolean().optional(),
|
||||
[OrgPermissionGroupActions.ManagePrivileges]: z.boolean().optional(),
|
||||
[OrgPermissionGroupActions.GrantPrivileges]: z.boolean().optional(),
|
||||
[OrgPermissionGroupActions.AddMembers]: z.boolean().optional(),
|
||||
[OrgPermissionGroupActions.RemoveMembers]: z.boolean().optional()
|
||||
})
|
||||
|
||||
+5
-5
@@ -15,7 +15,7 @@ const PERMISSION_ACTIONS = [
|
||||
{ action: OrgPermissionGroupActions.Create, label: "Create Groups" },
|
||||
{ action: OrgPermissionGroupActions.Edit, label: "Edit Groups" },
|
||||
{ action: OrgPermissionGroupActions.Delete, label: "Delete Groups" },
|
||||
{ action: OrgPermissionGroupActions.ManagePrivileges, label: "Manage Privileges" },
|
||||
{ action: OrgPermissionGroupActions.GrantPrivileges, label: "Grant Privileges" },
|
||||
{ action: OrgPermissionGroupActions.AddMembers, label: "Add Members" },
|
||||
{ action: OrgPermissionGroupActions.RemoveMembers, label: "Remove Members" }
|
||||
] as const;
|
||||
@@ -84,7 +84,7 @@ export const OrgPermissionGroupRow = ({ isEditable, control, setValue }: Props)
|
||||
[OrgPermissionGroupActions.Create]: false,
|
||||
[OrgPermissionGroupActions.Edit]: false,
|
||||
[OrgPermissionGroupActions.Delete]: false,
|
||||
[OrgPermissionGroupActions.ManagePrivileges]: false,
|
||||
[OrgPermissionGroupActions.GrantPrivileges]: false,
|
||||
[OrgPermissionGroupActions.AddMembers]: false,
|
||||
[OrgPermissionGroupActions.RemoveMembers]: false
|
||||
},
|
||||
@@ -99,7 +99,7 @@ export const OrgPermissionGroupRow = ({ isEditable, control, setValue }: Props)
|
||||
[OrgPermissionGroupActions.Create]: true,
|
||||
[OrgPermissionGroupActions.Edit]: true,
|
||||
[OrgPermissionGroupActions.Delete]: true,
|
||||
[OrgPermissionGroupActions.ManagePrivileges]: true,
|
||||
[OrgPermissionGroupActions.GrantPrivileges]: true,
|
||||
[OrgPermissionGroupActions.AddMembers]: true,
|
||||
[OrgPermissionGroupActions.RemoveMembers]: true
|
||||
},
|
||||
@@ -114,7 +114,7 @@ export const OrgPermissionGroupRow = ({ isEditable, control, setValue }: Props)
|
||||
[OrgPermissionGroupActions.Edit]: false,
|
||||
[OrgPermissionGroupActions.Create]: false,
|
||||
[OrgPermissionGroupActions.Delete]: false,
|
||||
[OrgPermissionGroupActions.ManagePrivileges]: false,
|
||||
[OrgPermissionGroupActions.GrantPrivileges]: false,
|
||||
[OrgPermissionGroupActions.AddMembers]: false,
|
||||
[OrgPermissionGroupActions.RemoveMembers]: false
|
||||
},
|
||||
@@ -129,7 +129,7 @@ export const OrgPermissionGroupRow = ({ isEditable, control, setValue }: Props)
|
||||
[OrgPermissionGroupActions.Edit]: false,
|
||||
[OrgPermissionGroupActions.Create]: false,
|
||||
[OrgPermissionGroupActions.Delete]: false,
|
||||
[OrgPermissionGroupActions.ManagePrivileges]: false,
|
||||
[OrgPermissionGroupActions.GrantPrivileges]: false,
|
||||
[OrgPermissionGroupActions.AddMembers]: false,
|
||||
[OrgPermissionGroupActions.RemoveMembers]: false
|
||||
},
|
||||
|
||||
+5
-5
@@ -15,7 +15,7 @@ const PERMISSION_ACTIONS = [
|
||||
{ action: OrgPermissionIdentityActions.Create, label: "Create Identities" },
|
||||
{ action: OrgPermissionIdentityActions.Edit, label: "Edit Identities" },
|
||||
{ action: OrgPermissionIdentityActions.Delete, label: "Delete Identities" },
|
||||
{ action: OrgPermissionIdentityActions.ManagePrivileges, label: "Manage Privileges" },
|
||||
{ action: OrgPermissionIdentityActions.GrantPrivileges, label: "Grant Privileges" },
|
||||
{ action: OrgPermissionIdentityActions.RevokeAuth, label: "Revoke Auth" },
|
||||
{ action: OrgPermissionIdentityActions.CreateToken, label: "Create Token" },
|
||||
{ action: OrgPermissionIdentityActions.GetToken, label: "Get Token" },
|
||||
@@ -86,7 +86,7 @@ export const OrgPermissionIdentityRow = ({ isEditable, control, setValue }: Prop
|
||||
[OrgPermissionIdentityActions.Edit]: false,
|
||||
[OrgPermissionIdentityActions.Create]: false,
|
||||
[OrgPermissionIdentityActions.Delete]: false,
|
||||
[OrgPermissionIdentityActions.ManagePrivileges]: false,
|
||||
[OrgPermissionIdentityActions.GrantPrivileges]: false,
|
||||
[OrgPermissionIdentityActions.RevokeAuth]: false,
|
||||
[OrgPermissionIdentityActions.CreateToken]: false,
|
||||
[OrgPermissionIdentityActions.GetToken]: false,
|
||||
@@ -103,7 +103,7 @@ export const OrgPermissionIdentityRow = ({ isEditable, control, setValue }: Prop
|
||||
[OrgPermissionIdentityActions.Edit]: true,
|
||||
[OrgPermissionIdentityActions.Create]: true,
|
||||
[OrgPermissionIdentityActions.Delete]: true,
|
||||
[OrgPermissionIdentityActions.ManagePrivileges]: true,
|
||||
[OrgPermissionIdentityActions.GrantPrivileges]: true,
|
||||
[OrgPermissionIdentityActions.RevokeAuth]: true,
|
||||
[OrgPermissionIdentityActions.CreateToken]: true,
|
||||
[OrgPermissionIdentityActions.GetToken]: true,
|
||||
@@ -120,7 +120,7 @@ export const OrgPermissionIdentityRow = ({ isEditable, control, setValue }: Prop
|
||||
[OrgPermissionIdentityActions.Edit]: false,
|
||||
[OrgPermissionIdentityActions.Create]: false,
|
||||
[OrgPermissionIdentityActions.Delete]: false,
|
||||
[OrgPermissionIdentityActions.ManagePrivileges]: false,
|
||||
[OrgPermissionIdentityActions.GrantPrivileges]: false,
|
||||
[OrgPermissionIdentityActions.RevokeAuth]: false,
|
||||
[OrgPermissionIdentityActions.CreateToken]: false,
|
||||
[OrgPermissionIdentityActions.GetToken]: false,
|
||||
@@ -137,7 +137,7 @@ export const OrgPermissionIdentityRow = ({ isEditable, control, setValue }: Prop
|
||||
[OrgPermissionIdentityActions.Edit]: false,
|
||||
[OrgPermissionIdentityActions.Create]: false,
|
||||
[OrgPermissionIdentityActions.Delete]: false,
|
||||
[OrgPermissionIdentityActions.ManagePrivileges]: false,
|
||||
[OrgPermissionIdentityActions.GrantPrivileges]: false,
|
||||
[OrgPermissionIdentityActions.RevokeAuth]: false,
|
||||
[OrgPermissionIdentityActions.CreateToken]: false,
|
||||
[OrgPermissionIdentityActions.GetToken]: false,
|
||||
|
||||
Reference in New Issue
Block a user