mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 22:28:47 +00:00
resolve rebase
This commit is contained in:
@@ -10,7 +10,7 @@ import { withProjectPermission } from "@app/hoc";
|
|||||||
import { useGetWorkspaceIdentityMembershipDetails } from "@app/hooks/api";
|
import { useGetWorkspaceIdentityMembershipDetails } from "@app/hooks/api";
|
||||||
|
|
||||||
import { IdentityProjectAdditionalPrivilegeSection } from "./components/IdentityProjectAdditionalPrivilegeSection";
|
import { IdentityProjectAdditionalPrivilegeSection } from "./components/IdentityProjectAdditionalPrivilegeSection";
|
||||||
import { IdentityRoleDetailsSection } from "./components/IdentityRoleDetailsSectiona";
|
import { IdentityRoleDetailsSection } from "./components/IdentityRoleDetailsSection";
|
||||||
|
|
||||||
export const IdentityDetailsPage = withProjectPermission(
|
export const IdentityDetailsPage = withProjectPermission(
|
||||||
() => {
|
() => {
|
||||||
|
|||||||
+12
-5
@@ -167,7 +167,7 @@ export const IdentityProjectAdditionalPrivilegeModifySection = ({
|
|||||||
onGoBack();
|
onGoBack();
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
createNotification({ type: "error", text: "Failed to update role" });
|
createNotification({ type: "error", text: "Failed to update privilege" });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ export const IdentityProjectAdditionalPrivilegeModifySection = ({
|
|||||||
privilegeTemporaryAccess?.isTemporary &&
|
privilegeTemporaryAccess?.isTemporary &&
|
||||||
new Date() > new Date(privilegeTemporaryAccess.temporaryAccessEndTime || "");
|
new Date() > new Date(privilegeTemporaryAccess.temporaryAccessEndTime || "");
|
||||||
let text = "Permanent";
|
let text = "Permanent";
|
||||||
let toolTipText = "Non expiry access";
|
let toolTipText = "Non-Expiring Access";
|
||||||
|
|
||||||
if (isTemporary) {
|
if (isTemporary) {
|
||||||
if (isExpired) {
|
if (isExpired) {
|
||||||
@@ -206,7 +206,14 @@ export const IdentityProjectAdditionalPrivilegeModifySection = ({
|
|||||||
<IconButton ariaLabel="go-back" variant="plain" onClick={onGoBack}>
|
<IconButton ariaLabel="go-back" variant="plain" onClick={onGoBack}>
|
||||||
<FontAwesomeIcon icon={faChevronLeft} />
|
<FontAwesomeIcon icon={faChevronLeft} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<h3 className="text-lg font-semibold text-mineshaft-100">Edit Additional Privilege</h3>
|
<div>
|
||||||
|
<h3 className="text-lg font-semibold text-mineshaft-100">
|
||||||
|
Edit Additional Privileges
|
||||||
|
</h3>
|
||||||
|
<p className="text-sm text-mineshaft-400">
|
||||||
|
Additional privileges take precedence over roles when permissions conflict
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center space-x-4">
|
<div className="flex items-center space-x-4">
|
||||||
{isDirty && (
|
{isDirty && (
|
||||||
@@ -242,7 +249,7 @@ export const IdentityProjectAdditionalPrivilegeModifySection = ({
|
|||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
isDisabled={isDisabled}
|
isDisabled={isDisabled}
|
||||||
>
|
>
|
||||||
New policy
|
New Policy
|
||||||
</Button>
|
</Button>
|
||||||
</ModalTrigger>
|
</ModalTrigger>
|
||||||
<ModalContent title="New Policy" subTitle="Policies grant additional permissions.">
|
<ModalContent title="New Policy" subTitle="Policies grant additional permissions.">
|
||||||
@@ -297,7 +304,7 @@ export const IdentityProjectAdditionalPrivilegeModifySection = ({
|
|||||||
>
|
>
|
||||||
<div className="flex flex-col space-y-4">
|
<div className="flex flex-col space-y-4">
|
||||||
<div className="border-b border-b-gray-700 pb-2 text-sm text-mineshaft-300">
|
<div className="border-b border-b-gray-700 pb-2 text-sm text-mineshaft-300">
|
||||||
Configure timed access
|
Configure Timed Access
|
||||||
</div>
|
</div>
|
||||||
{isExpired && <Tag colorSchema="red">Expired</Tag>}
|
{isExpired && <Tag colorSchema="red">Expired</Tag>}
|
||||||
<Controller
|
<Controller
|
||||||
|
|||||||
+5
-5
@@ -61,7 +61,7 @@ export const IdentityProjectAdditionalPrivilegeSection = ({ identityMembershipDe
|
|||||||
handlePopUpClose("deletePrivilege");
|
handlePopUpClose("deletePrivilege");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
createNotification({ type: "error", text: "Failed to delete role" });
|
createNotification({ type: "error", text: "Failed to delete privilege" });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ export const IdentityProjectAdditionalPrivilegeSection = ({ identityMembershipDe
|
|||||||
I={ProjectPermissionActions.Edit}
|
I={ProjectPermissionActions.Edit}
|
||||||
a={ProjectPermissionSub.Identity}
|
a={ProjectPermissionSub.Identity}
|
||||||
renderTooltip
|
renderTooltip
|
||||||
allowedLabel="New privilege"
|
allowedLabel="Add Privilege"
|
||||||
>
|
>
|
||||||
{(isAllowed) => (
|
{(isAllowed) => (
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -144,7 +144,7 @@ export const IdentityProjectAdditionalPrivilegeSection = ({ identityMembershipDe
|
|||||||
new Date() > new Date(privilegeDetails.temporaryAccessEndTime || "");
|
new Date() > new Date(privilegeDetails.temporaryAccessEndTime || "");
|
||||||
|
|
||||||
let text = "Permanent";
|
let text = "Permanent";
|
||||||
let toolTipText = "Non expiry access";
|
let toolTipText = "Non-Expiring Access";
|
||||||
if (privilegeDetails.isTemporary) {
|
if (privilegeDetails.isTemporary) {
|
||||||
if (isExpired) {
|
if (isExpired) {
|
||||||
text = "Access Expired";
|
text = "Access Expired";
|
||||||
@@ -194,7 +194,7 @@ export const IdentityProjectAdditionalPrivilegeSection = ({ identityMembershipDe
|
|||||||
I={ProjectPermissionActions.Edit}
|
I={ProjectPermissionActions.Edit}
|
||||||
a={ProjectPermissionSub.Identity}
|
a={ProjectPermissionSub.Identity}
|
||||||
renderTooltip
|
renderTooltip
|
||||||
allowedLabel="Remove role"
|
allowedLabel="Remove Role"
|
||||||
>
|
>
|
||||||
{(isAllowed) => (
|
{(isAllowed) => (
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -227,7 +227,7 @@ export const IdentityProjectAdditionalPrivilegeSection = ({ identityMembershipDe
|
|||||||
</TBody>
|
</TBody>
|
||||||
</Table>
|
</Table>
|
||||||
{!isLoading && !userProjectPrivileges?.length && (
|
{!isLoading && !userProjectPrivileges?.length && (
|
||||||
<EmptyState title="This user has no additional privileges" icon={faFolder} />
|
<EmptyState title="This identity has no additional privileges" icon={faFolder} />
|
||||||
)}
|
)}
|
||||||
</TableContainer>
|
</TableContainer>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+7
-4
@@ -56,7 +56,7 @@ export const IdentityRoleDetailsSection = ({
|
|||||||
identityId: identityMembershipDetails.identity.id,
|
identityId: identityMembershipDetails.identity.id,
|
||||||
roles: updatedRole
|
roles: updatedRole
|
||||||
});
|
});
|
||||||
createNotification({ type: "success", text: "Successfully removed the role" });
|
createNotification({ type: "success", text: "Successfully removed role" });
|
||||||
handlePopUpClose("deleteRole");
|
handlePopUpClose("deleteRole");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
@@ -111,7 +111,7 @@ export const IdentityRoleDetailsSection = ({
|
|||||||
new Date() > new Date(roleDetails.temporaryAccessEndTime || "");
|
new Date() > new Date(roleDetails.temporaryAccessEndTime || "");
|
||||||
|
|
||||||
let text = "Permanent";
|
let text = "Permanent";
|
||||||
let toolTipText = "Non expiry access";
|
let toolTipText = "Non-Expiring Access";
|
||||||
if (roleDetails.isTemporary) {
|
if (roleDetails.isTemporary) {
|
||||||
if (isExpired) {
|
if (isExpired) {
|
||||||
text = "Access Expired";
|
text = "Access Expired";
|
||||||
@@ -154,7 +154,7 @@ export const IdentityRoleDetailsSection = ({
|
|||||||
I={ProjectPermissionActions.Edit}
|
I={ProjectPermissionActions.Edit}
|
||||||
a={ProjectPermissionSub.Member}
|
a={ProjectPermissionSub.Member}
|
||||||
renderTooltip
|
renderTooltip
|
||||||
allowedLabel="Remove role"
|
allowedLabel="Remove Role"
|
||||||
>
|
>
|
||||||
{(isAllowed) => (
|
{(isAllowed) => (
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -198,7 +198,10 @@ export const IdentityRoleDetailsSection = ({
|
|||||||
isOpen={popUp.modifyRole.isOpen}
|
isOpen={popUp.modifyRole.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("modifyRole", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("modifyRole", isOpen)}
|
||||||
>
|
>
|
||||||
<ModalContent title="Roles" subTitle="Select one of the pre-defined or custom roles.">
|
<ModalContent
|
||||||
|
title="Roles"
|
||||||
|
subTitle="Select one or more of the pre-defined or custom roles to configure project permissions."
|
||||||
|
>
|
||||||
<IdentityRoleModify identityProjectMembership={identityMembershipDetails} />
|
<IdentityRoleModify identityProjectMembership={identityMembershipDetails} />
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
+5
-5
@@ -122,7 +122,7 @@ export const IdentityRoleModify = ({ identityProjectMembership }: Props) => {
|
|||||||
});
|
});
|
||||||
createNotification({ text: "Successfully updated roles", type: "success" });
|
createNotification({ text: "Successfully updated roles", type: "success" });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
createNotification({ text: "Failed to update role", type: "error" });
|
createNotification({ text: "Failed to update roles", type: "error" });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ export const IdentityRoleModify = ({ identityProjectMembership }: Props) => {
|
|||||||
new Date(temporaryAccess.temporaryAccessEndTime || ""),
|
new Date(temporaryAccess.temporaryAccessEndTime || ""),
|
||||||
"yyyy-MM-dd HH:mm:ss"
|
"yyyy-MM-dd HH:mm:ss"
|
||||||
)}`
|
)}`
|
||||||
: "Non expiry access"
|
: "Non-Expiring Access"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
@@ -212,7 +212,7 @@ export const IdentityRoleModify = ({ identityProjectMembership }: Props) => {
|
|||||||
>
|
>
|
||||||
<div className="flex flex-col space-y-4">
|
<div className="flex flex-col space-y-4">
|
||||||
<div className="border-b border-b-gray-700 pb-2 text-sm text-mineshaft-300">
|
<div className="border-b border-b-gray-700 pb-2 text-sm text-mineshaft-300">
|
||||||
Configure timed access
|
Configure Timed Access
|
||||||
</div>
|
</div>
|
||||||
{isExpired && <Tag colorSchema="red">Expired</Tag>}
|
{isExpired && <Tag colorSchema="red">Expired</Tag>}
|
||||||
<Controller
|
<Controller
|
||||||
@@ -283,7 +283,7 @@ export const IdentityRoleModify = ({ identityProjectMembership }: Props) => {
|
|||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
className="border border-mineshaft-500 bg-mineshaft-600 py-3 hover:border-red/70 hover:bg-red/20"
|
className="border border-mineshaft-500 bg-mineshaft-600 py-3 hover:border-red/70 hover:bg-red/20"
|
||||||
ariaLabel="delete-role"
|
ariaLabel="delete-role"
|
||||||
isDisabled={isIdentityEditDisabled}
|
isDisabled={isIdentityEditDisabled || selectedRoleList.fields.length === 1}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (selectedRoleList.fields.length > 1) {
|
if (selectedRoleList.fields.length > 1) {
|
||||||
selectedRoleList.remove(index);
|
selectedRoleList.remove(index);
|
||||||
@@ -297,7 +297,7 @@ export const IdentityRoleModify = ({ identityProjectMembership }: Props) => {
|
|||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
<div className="mt-4 flex justify-between space-x-2">
|
<div className="mt-4 flex justify-between space-x-2">
|
||||||
<ProjectPermissionCan I={ProjectPermissionActions.Edit} a={ProjectPermissionSub.Member}>
|
<ProjectPermissionCan I={ProjectPermissionActions.Edit} a={ProjectPermissionSub.Identity}>
|
||||||
{(isAllowed) => (
|
{(isAllowed) => (
|
||||||
<Button
|
<Button
|
||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
+4
-4
@@ -68,7 +68,7 @@ export const MemberProjectAdditionalPrivilegeSection = ({ membershipDetails }: P
|
|||||||
handlePopUpClose("deletePrivilege");
|
handlePopUpClose("deletePrivilege");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
createNotification({ type: "error", text: "Failed to delete role" });
|
createNotification({ type: "error", text: "Failed to delete privilege" });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ export const MemberProjectAdditionalPrivilegeSection = ({ membershipDetails }: P
|
|||||||
I={ProjectPermissionActions.Edit}
|
I={ProjectPermissionActions.Edit}
|
||||||
a={ProjectPermissionSub.Member}
|
a={ProjectPermissionSub.Member}
|
||||||
renderTooltip
|
renderTooltip
|
||||||
allowedLabel="New privilege"
|
allowedLabel="Add Privilege"
|
||||||
>
|
>
|
||||||
{(isAllowed) => (
|
{(isAllowed) => (
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -151,7 +151,7 @@ export const MemberProjectAdditionalPrivilegeSection = ({ membershipDetails }: P
|
|||||||
new Date() > new Date(privilegeDetails.temporaryAccessEndTime || "");
|
new Date() > new Date(privilegeDetails.temporaryAccessEndTime || "");
|
||||||
|
|
||||||
let text = "Permanent";
|
let text = "Permanent";
|
||||||
let toolTipText = "Non expiry access";
|
let toolTipText = "Non-Expiring Access";
|
||||||
if (privilegeDetails.isTemporary) {
|
if (privilegeDetails.isTemporary) {
|
||||||
if (isExpired) {
|
if (isExpired) {
|
||||||
text = "Access Expired";
|
text = "Access Expired";
|
||||||
@@ -201,7 +201,7 @@ export const MemberProjectAdditionalPrivilegeSection = ({ membershipDetails }: P
|
|||||||
I={ProjectPermissionActions.Edit}
|
I={ProjectPermissionActions.Edit}
|
||||||
a={ProjectPermissionSub.Member}
|
a={ProjectPermissionSub.Member}
|
||||||
renderTooltip
|
renderTooltip
|
||||||
allowedLabel="Remove role"
|
allowedLabel="Remove Role"
|
||||||
>
|
>
|
||||||
{(isAllowed) => (
|
{(isAllowed) => (
|
||||||
<IconButton
|
<IconButton
|
||||||
|
|||||||
+3
-3
@@ -175,7 +175,7 @@ export const MembershipProjectAdditionalPrivilegeModifySection = ({
|
|||||||
privilegeTemporaryAccess?.isTemporary &&
|
privilegeTemporaryAccess?.isTemporary &&
|
||||||
new Date() > new Date(privilegeTemporaryAccess.temporaryAccessEndTime || "");
|
new Date() > new Date(privilegeTemporaryAccess.temporaryAccessEndTime || "");
|
||||||
let text = "Permanent";
|
let text = "Permanent";
|
||||||
let toolTipText = "Non expiry access";
|
let toolTipText = "Non-Expiring Access";
|
||||||
|
|
||||||
if (isTemporary) {
|
if (isTemporary) {
|
||||||
if (isExpired) {
|
if (isExpired) {
|
||||||
@@ -240,7 +240,7 @@ export const MembershipProjectAdditionalPrivilegeModifySection = ({
|
|||||||
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
leftIcon={<FontAwesomeIcon icon={faPlus} />}
|
||||||
isDisabled={isDisabled}
|
isDisabled={isDisabled}
|
||||||
>
|
>
|
||||||
New policy
|
New Policy
|
||||||
</Button>
|
</Button>
|
||||||
</ModalTrigger>
|
</ModalTrigger>
|
||||||
<ModalContent title="New Policy" subTitle="Policies grant additional permissions.">
|
<ModalContent title="New Policy" subTitle="Policies grant additional permissions.">
|
||||||
@@ -295,7 +295,7 @@ export const MembershipProjectAdditionalPrivilegeModifySection = ({
|
|||||||
>
|
>
|
||||||
<div className="flex flex-col space-y-4">
|
<div className="flex flex-col space-y-4">
|
||||||
<div className="border-b border-b-gray-700 pb-2 text-sm text-mineshaft-300">
|
<div className="border-b border-b-gray-700 pb-2 text-sm text-mineshaft-300">
|
||||||
Configure timed access
|
Configure Timed Access
|
||||||
</div>
|
</div>
|
||||||
{isExpired && <Tag colorSchema="red">Expired</Tag>}
|
{isExpired && <Tag colorSchema="red">Expired</Tag>}
|
||||||
<Controller
|
<Controller
|
||||||
|
|||||||
+8
-5
@@ -65,7 +65,7 @@ export const MemberRoleDetailsSection = ({
|
|||||||
roles: updatedRole,
|
roles: updatedRole,
|
||||||
membershipId: membershipDetails.id
|
membershipId: membershipDetails.id
|
||||||
});
|
});
|
||||||
createNotification({ type: "success", text: "Successfully removed the role" });
|
createNotification({ type: "success", text: "Successfully removed role" });
|
||||||
handlePopUpClose("deleteRole");
|
handlePopUpClose("deleteRole");
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
@@ -82,7 +82,7 @@ export const MemberRoleDetailsSection = ({
|
|||||||
I={ProjectPermissionActions.Edit}
|
I={ProjectPermissionActions.Edit}
|
||||||
a={ProjectPermissionSub.Member}
|
a={ProjectPermissionSub.Member}
|
||||||
renderTooltip
|
renderTooltip
|
||||||
allowedLabel="Edit role(s)"
|
allowedLabel="Edit Role(s)"
|
||||||
>
|
>
|
||||||
{(isAllowed) => (
|
{(isAllowed) => (
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -122,7 +122,7 @@ export const MemberRoleDetailsSection = ({
|
|||||||
new Date() > new Date(roleDetails.temporaryAccessEndTime || "");
|
new Date() > new Date(roleDetails.temporaryAccessEndTime || "");
|
||||||
|
|
||||||
let text = "Permanent";
|
let text = "Permanent";
|
||||||
let toolTipText = "Non expiry access";
|
let toolTipText = "Non-Expiring Access";
|
||||||
if (roleDetails.isTemporary) {
|
if (roleDetails.isTemporary) {
|
||||||
if (isExpired) {
|
if (isExpired) {
|
||||||
text = "Access Expired";
|
text = "Access Expired";
|
||||||
@@ -165,7 +165,7 @@ export const MemberRoleDetailsSection = ({
|
|||||||
I={ProjectPermissionActions.Edit}
|
I={ProjectPermissionActions.Edit}
|
||||||
a={ProjectPermissionSub.Member}
|
a={ProjectPermissionSub.Member}
|
||||||
renderTooltip
|
renderTooltip
|
||||||
allowedLabel="Remove role"
|
allowedLabel="Remove Role"
|
||||||
>
|
>
|
||||||
{(isAllowed) => (
|
{(isAllowed) => (
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -209,7 +209,10 @@ export const MemberRoleDetailsSection = ({
|
|||||||
isOpen={popUp.modifyRole.isOpen}
|
isOpen={popUp.modifyRole.isOpen}
|
||||||
onOpenChange={(isOpen) => handlePopUpToggle("modifyRole", isOpen)}
|
onOpenChange={(isOpen) => handlePopUpToggle("modifyRole", isOpen)}
|
||||||
>
|
>
|
||||||
<ModalContent title="Roles" subTitle="Select one of the pre-defined or custom roles.">
|
<ModalContent
|
||||||
|
title="Roles"
|
||||||
|
subTitle="Select one or more of the pre-defined or custom roles to configure project permissions."
|
||||||
|
>
|
||||||
<MemberRoleModify projectMember={membershipDetails} onOpenUpgradeModal={() => {}} />
|
<MemberRoleModify projectMember={membershipDetails} onOpenUpgradeModal={() => {}} />
|
||||||
</ModalContent>
|
</ModalContent>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|||||||
+4
-4
@@ -136,7 +136,7 @@ export const MemberRoleModify = ({ projectMember, onOpenUpgradeModal }: Props) =
|
|||||||
});
|
});
|
||||||
createNotification({ text: "Successfully updated roles", type: "success" });
|
createNotification({ text: "Successfully updated roles", type: "success" });
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
createNotification({ text: "Failed to update role", type: "error" });
|
createNotification({ text: "Failed to update roles", type: "error" });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -191,7 +191,7 @@ export const MemberRoleModify = ({ projectMember, onOpenUpgradeModal }: Props) =
|
|||||||
new Date(temporaryAccess.temporaryAccessEndTime || ""),
|
new Date(temporaryAccess.temporaryAccessEndTime || ""),
|
||||||
"yyyy-MM-dd HH:mm:ss"
|
"yyyy-MM-dd HH:mm:ss"
|
||||||
)}`
|
)}`
|
||||||
: "Non expiry access"
|
: "Non-Expiring Access"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
@@ -226,7 +226,7 @@ export const MemberRoleModify = ({ projectMember, onOpenUpgradeModal }: Props) =
|
|||||||
>
|
>
|
||||||
<div className="flex flex-col space-y-4">
|
<div className="flex flex-col space-y-4">
|
||||||
<div className="border-b border-b-gray-700 pb-2 text-sm text-mineshaft-300">
|
<div className="border-b border-b-gray-700 pb-2 text-sm text-mineshaft-300">
|
||||||
Configure timed access
|
Configure Timed Access
|
||||||
</div>
|
</div>
|
||||||
{isExpired && <Tag colorSchema="red">Expired</Tag>}
|
{isExpired && <Tag colorSchema="red">Expired</Tag>}
|
||||||
<Controller
|
<Controller
|
||||||
@@ -297,7 +297,7 @@ export const MemberRoleModify = ({ projectMember, onOpenUpgradeModal }: Props) =
|
|||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
className="border border-mineshaft-500 bg-mineshaft-600 py-3 hover:border-red/70 hover:bg-red/20"
|
className="border border-mineshaft-500 bg-mineshaft-600 py-3 hover:border-red/70 hover:bg-red/20"
|
||||||
ariaLabel="delete-role"
|
ariaLabel="delete-role"
|
||||||
isDisabled={isMemberEditDisabled}
|
isDisabled={isMemberEditDisabled || selectedRoleList.fields.length === 1}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (selectedRoleList.fields.length > 1) {
|
if (selectedRoleList.fields.length > 1) {
|
||||||
selectedRoleList.remove(index);
|
selectedRoleList.remove(index);
|
||||||
|
|||||||
+1
-1
@@ -300,7 +300,7 @@ export const IdentityRbacSection = ({ identityProjectMember, onOpenUpgradeModal
|
|||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
className="border border-mineshaft-500 bg-mineshaft-600 py-3 hover:border-red/70 hover:bg-red/20"
|
className="border border-mineshaft-500 bg-mineshaft-600 py-3 hover:border-red/70 hover:bg-red/20"
|
||||||
ariaLabel="delete-role"
|
ariaLabel="delete-role"
|
||||||
isDisabled={isMemberEditDisabled}
|
isDisabled={isMemberEditDisabled || selectedRoleList.fields.length === 1}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (selectedRoleList.fields.length > 1) {
|
if (selectedRoleList.fields.length > 1) {
|
||||||
selectedRoleList.remove(index);
|
selectedRoleList.remove(index);
|
||||||
|
|||||||
+1
-1
@@ -300,7 +300,7 @@ export const MemberRbacSection = ({ projectMember, onOpenUpgradeModal }: Props)
|
|||||||
variant="outline_bg"
|
variant="outline_bg"
|
||||||
className="border border-mineshaft-500 bg-mineshaft-600 py-3 hover:border-red/70 hover:bg-red/20"
|
className="border border-mineshaft-500 bg-mineshaft-600 py-3 hover:border-red/70 hover:bg-red/20"
|
||||||
ariaLabel="delete-role"
|
ariaLabel="delete-role"
|
||||||
isDisabled={isMemberEditDisabled}
|
isDisabled={isMemberEditDisabled || selectedRoleList.fields.length === 1}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (selectedRoleList.fields.length > 1) {
|
if (selectedRoleList.fields.length > 1) {
|
||||||
selectedRoleList.remove(index);
|
selectedRoleList.remove(index);
|
||||||
|
|||||||
Reference in New Issue
Block a user