mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 14:27:30 +00:00
make org permissions more readable
This commit is contained in:
committed by
Akhil Mohan
parent
98893a40f1
commit
2ed079830a
+10
-10
@@ -35,20 +35,20 @@ type Props = {
|
|||||||
|
|
||||||
const SIMPLE_PERMISSION_OPTIONS = [
|
const SIMPLE_PERMISSION_OPTIONS = [
|
||||||
{
|
{
|
||||||
title: "Members",
|
title: "Members management",
|
||||||
subtitle: "Project member management control",
|
subtitle: "Invite, view and remove members from the organization",
|
||||||
icon: faUsers,
|
icon: faUsers,
|
||||||
formName: "member"
|
formName: "member"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Billing",
|
title: "Billing & usage",
|
||||||
subtitle: "Billing management control",
|
subtitle: "Modify organization subscription plan",
|
||||||
icon: faMoneyBill,
|
icon: faMoneyBill,
|
||||||
formName: "billing"
|
formName: "billing"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Role",
|
title: "Role management",
|
||||||
subtitle: "Org role management control",
|
subtitle: "Create, modify and remove organization roles",
|
||||||
icon: faUserCog,
|
icon: faUserCog,
|
||||||
formName: "role"
|
formName: "role"
|
||||||
},
|
},
|
||||||
@@ -59,8 +59,8 @@ const SIMPLE_PERMISSION_OPTIONS = [
|
|||||||
formName: "incident-contact"
|
formName: "incident-contact"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "Settings",
|
title: "Organization profile",
|
||||||
subtitle: "Settings management control",
|
subtitle: "View & update organization metadata such as name",
|
||||||
icon: faCog,
|
icon: faCog,
|
||||||
formName: "settings"
|
formName: "settings"
|
||||||
},
|
},
|
||||||
@@ -72,7 +72,7 @@ const SIMPLE_PERMISSION_OPTIONS = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "SSO",
|
title: "SSO",
|
||||||
subtitle: "SSO management control",
|
subtitle: "Define organization level SSO requirements",
|
||||||
icon: faSignIn,
|
icon: faSignIn,
|
||||||
formName: "sso"
|
formName: "sso"
|
||||||
}
|
}
|
||||||
@@ -155,7 +155,7 @@ export const OrgRoleModifySection = ({ role, onGoBack }: Props) => {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<p className="mb-8 text-gray-400">
|
<p className="mb-8 text-gray-400">
|
||||||
Roles are used to grant access to particular resources in your organization
|
Organization-level roles allow you to define permissions for resources at a high level across the organization
|
||||||
</p>
|
</p>
|
||||||
<div className="flex flex-col space-y-6">
|
<div className="flex flex-col space-y-6">
|
||||||
<FormControl
|
<FormControl
|
||||||
|
|||||||
+18
@@ -41,6 +41,20 @@ const SECRET_SCANNING_PERMISSIONS = [
|
|||||||
{ action: "delete", label: "Remove integrations" }
|
{ action: "delete", label: "Remove integrations" }
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
|
const INCIDENT_CONTACTS_PERMISSIONS = [
|
||||||
|
{ action: "read", label: "View contacts" },
|
||||||
|
{ action: "create", label: "Add new contacts" },
|
||||||
|
{ action: "edit", label: "Edit contacts" },
|
||||||
|
{ action: "delete", label: "Remove contacts" }
|
||||||
|
] as const;
|
||||||
|
|
||||||
|
const MEMBERS_PERMISSIONS = [
|
||||||
|
{ action: "read", label: "View all members" },
|
||||||
|
{ action: "create", label: "Invite members" },
|
||||||
|
{ action: "edit", label: "Edit members" },
|
||||||
|
{ action: "delete", label: "Remove members" }
|
||||||
|
] as const;
|
||||||
|
|
||||||
const BILLING_PERMISSIONS = [
|
const BILLING_PERMISSIONS = [
|
||||||
{ action: "read", label: "View bills" },
|
{ action: "read", label: "View bills" },
|
||||||
{ action: "create", label: "Add payment methods" },
|
{ action: "create", label: "Add payment methods" },
|
||||||
@@ -54,6 +68,10 @@ const getPermissionList = (option: Props["formName"]) => {
|
|||||||
return SECRET_SCANNING_PERMISSIONS;
|
return SECRET_SCANNING_PERMISSIONS;
|
||||||
case "billing":
|
case "billing":
|
||||||
return BILLING_PERMISSIONS;
|
return BILLING_PERMISSIONS;
|
||||||
|
case "incident-contact":
|
||||||
|
return INCIDENT_CONTACTS_PERMISSIONS;
|
||||||
|
case "member":
|
||||||
|
return MEMBERS_PERMISSIONS
|
||||||
default:
|
default:
|
||||||
return PERMISSIONS;
|
return PERMISSIONS;
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -24,8 +24,8 @@ enum Permission {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const PERMISSIONS = [
|
const PERMISSIONS = [
|
||||||
{ action: "read", label: "View" },
|
{ action: "read", label: "View projects" },
|
||||||
{ action: "create", label: "Create" }
|
{ action: "create", label: "Create new projects" }
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
export const WorkspacePermission = ({ isNonEditable, setValue, control }: Props) => {
|
export const WorkspacePermission = ({ isNonEditable, setValue, control }: Props) => {
|
||||||
@@ -87,7 +87,7 @@ export const WorkspacePermission = ({ isNonEditable, setValue, control }: Props)
|
|||||||
<div className="flex-grow flex flex-col">
|
<div className="flex-grow flex flex-col">
|
||||||
<div className="font-medium mb-1 text-lg">Project</div>
|
<div className="font-medium mb-1 text-lg">Project</div>
|
||||||
<div className="text-xs font-light">
|
<div className="text-xs font-light">
|
||||||
More fine granined project access control can be defined with project level roles
|
View and create new projects in this organization
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
+1
-1
@@ -186,7 +186,7 @@ export const ProjectRoleModifySection = ({ role, onGoBack }: Props) => {
|
|||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
<p className="mb-8 text-gray-400">
|
<p className="mb-8 text-gray-400">
|
||||||
Roles are used to grant access to particular resources in your organization
|
Project-level roles allow you to define permissions for resources within projects at a granular level
|
||||||
</p>
|
</p>
|
||||||
<div className="flex flex-col space-y-6">
|
<div className="flex flex-col space-y-6">
|
||||||
<FormControl
|
<FormControl
|
||||||
|
|||||||
Reference in New Issue
Block a user