mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-18 22:29:15 +00:00
Update MI authz logic
This commit is contained in:
+9
-2
@@ -9,6 +9,7 @@ import {
|
||||
faLock,
|
||||
faNetworkWired,
|
||||
faPuzzlePiece,
|
||||
faServer,
|
||||
faShield,
|
||||
faTags,
|
||||
faUser,
|
||||
@@ -59,6 +60,12 @@ const SINGLE_PERMISSION_LIST = [
|
||||
icon: faUser,
|
||||
formName: "member"
|
||||
},
|
||||
{
|
||||
title: "Machine identity management",
|
||||
subtitle: "Add, view, update and remove machine identities from the project",
|
||||
icon: faServer,
|
||||
formName: "machine-identity"
|
||||
},
|
||||
{
|
||||
title: "Webhooks",
|
||||
subtitle: "Webhook management control",
|
||||
@@ -109,7 +116,7 @@ type Props = {
|
||||
};
|
||||
|
||||
export const ProjectRoleModifySection = ({ role, onGoBack }: Props) => {
|
||||
const isNonEditable = ["admin", "member", "viewer"].includes(role?.slug || "");
|
||||
const isNonEditable = ["admin", "member", "viewer", "no-access"].includes(role?.slug || "");
|
||||
const isNewRole = !role?.slug;
|
||||
|
||||
const { createNotification } = useNotificationContext();
|
||||
@@ -133,7 +140,7 @@ export const ProjectRoleModifySection = ({ role, onGoBack }: Props) => {
|
||||
|
||||
const handleRoleUpdate = async (el: TFormSchema) => {
|
||||
if (!role?._id) return;
|
||||
|
||||
|
||||
try {
|
||||
await updateRole({
|
||||
orgId,
|
||||
|
||||
+1
@@ -33,6 +33,7 @@ export const formSchema = z.object({
|
||||
.object({
|
||||
secrets: z.record(multiEnvPermissionSchema).optional(),
|
||||
member: generalPermissionSchema,
|
||||
"machine-identity": generalPermissionSchema,
|
||||
role: generalPermissionSchema,
|
||||
integrations: generalPermissionSchema,
|
||||
webhooks: generalPermissionSchema,
|
||||
|
||||
Reference in New Issue
Block a user