diff --git a/frontend/src/pages/project/AccessControlPage/components/MembersTab/components/MemberRoleForm/SpecificPrivilegeSection.tsx b/frontend/src/pages/project/AccessControlPage/components/MembersTab/components/MemberRoleForm/SpecificPrivilegeSection.tsx index e8bc03698..e8d2ef77f 100644 --- a/frontend/src/pages/project/AccessControlPage/components/MembersTab/components/MemberRoleForm/SpecificPrivilegeSection.tsx +++ b/frontend/src/pages/project/AccessControlPage/components/MembersTab/components/MemberRoleForm/SpecificPrivilegeSection.tsx @@ -1,11 +1,15 @@ +/* eslint-disable jsx-a11y/label-has-associated-control */ import { useMemo } from "react"; import { Controller, useForm } from "react-hook-form"; +import { faEye, faTrashCan } from "@fortawesome/free-regular-svg-icons"; import { faArrowRotateLeft, faCaretDown, faCheck, faClock, faLockOpen, + faPencil, + faPlus, faTrash } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; @@ -205,7 +209,7 @@ export const SpecificPrivilegeSecretForm = ({ if (!data.secretPath) { createNotification({ type: "error", - text: "Please select a secret path", + text: "Please select a secret path...", title: "Error" }); return; @@ -264,18 +268,18 @@ export const SpecificPrivilegeSecretForm = ({ }; return ( -
+
-
+
( - + field.onChange(e)} > {selectablePaths.map((path) => ( @@ -328,222 +333,287 @@ export const SpecificPrivilegeSecretForm = ({ ); }} /> -
- ( -
- - field.onChange(isChecked)} - /> -
- )} - /> - ( -
- - field.onChange(isChecked)} - /> -
- )} - /> - ( -
- - field.onChange(isChecked)} - /> -
- )} - /> - ( -
- - field.onChange(isChecked)} - /> -
- )} - /> -
-
- - -
- - - -
-
- -
-
- Configure timed access -
- {isExpired && Expired} - ( - } - isError={Boolean(error?.message)} - errorText={error?.message} + field.onChange(isChecked)} + /> +
+
+ + +
+

Read secret values

+
+ + )} + /> + ( + + )} + /> +
+
+ ( + + )} + /> + ( + + )} + /> +
+
+
+ +
+ + +
+ + - - {temporaryAccessField.isTemporary && ( + {getAccessLabel(false)} + + +
+
+ +
+
Configure timed access
+ {isExpired && Expired} + ( + } + isError={Boolean(error?.message)} + errorText={error?.message} + > + + + )} + /> +
- )} + + {temporaryAccessField.isTemporary && ( + + )} +
-
- - - {/* eslint-disable-next-line no-nested-ternary */} - {privilegeForm.formState.isDirty && privilege ? ( - <> - - privilegeForm.reset()} + + + {/* eslint-disable-next-line no-nested-ternary */} + {privilegeForm.formState.isDirty && privilege ? ( + <> + + privilegeForm.reset()} + > + + + + - - - + + {privilegeForm.formState.isSubmitting ? ( + + ) : ( + + )} + + + + ) : // eslint-disable-next-line no-nested-ternary + privilege ? ( handlePopUpOpen("deletePrivilege")} > - {privilegeForm.formState.isSubmitting ? ( - - ) : ( - - )} + - - ) : // eslint-disable-next-line no-nested-ternary - privilege ? ( - - handlePopUpOpen("deletePrivilege")} - > - - - - ) : ( -
- )} -
+ ) : ( +
+ )} +
+
(
- +
)} /> diff --git a/frontend/src/pages/project/RoleDetailsBySlugPage/components/RolePermissionsSection.tsx b/frontend/src/pages/project/RoleDetailsBySlugPage/components/RolePermissionsSection.tsx index a1bbe3d54..382cb0b55 100644 --- a/frontend/src/pages/project/RoleDetailsBySlugPage/components/RolePermissionsSection.tsx +++ b/frontend/src/pages/project/RoleDetailsBySlugPage/components/RolePermissionsSection.tsx @@ -158,8 +158,8 @@ export const RolePermissionsSection = ({ roleSlug, isDisabled }: Props) => { variant="outline_bg" type="submit" className={twMerge( - "mr-4 h-10 border border-primary", - isDirty && "bg-primary text-black" + "mr-4 h-10 border", + isDirty && "bg-primary text-black hover:bg-primary hover:opacity-80" )} isDisabled={isSubmitting || !isDirty} isLoading={isSubmitting} diff --git a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/AccessApprovalRequest/components/RequestAccessModal.tsx b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/AccessApprovalRequest/components/RequestAccessModal.tsx index 8b3561bf6..b337f4e69 100644 --- a/frontend/src/pages/secret-manager/SecretApprovalsPage/components/AccessApprovalRequest/components/RequestAccessModal.tsx +++ b/frontend/src/pages/secret-manager/SecretApprovalsPage/components/AccessApprovalRequest/components/RequestAccessModal.tsx @@ -14,9 +14,9 @@ export const RequestAccessModal = ({ return ( onOpenChange(false)} policies={policies} />