File tree Expand file tree Collapse file tree
src/components/shared/modals Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -495,6 +495,13 @@ export const AccessPolicyTable = <T extends AccessPolicyTabFormikProps>({
495495 ) /* <!-- Write --> */
496496 }
497497 </ th >
498+ < th className = "fit" >
499+ {
500+ t (
501+ "EVENTS.EVENTS.DETAILS.ACCESS.ACCESS_POLICY.READ" ,
502+ ) /* <!-- Read --> */
503+ }
504+ </ th >
498505 { hasActions && (
499506 < th className = "fit" >
500507 {
@@ -564,6 +571,31 @@ export const AccessPolicyTable = <T extends AccessPolicyTabFormikProps>({
564571 </ td >
565572
566573 { /* Checkboxes for policy.read and policy.write */ }
574+ < td className = "fit text-center" >
575+ < Field
576+ type = "checkbox"
577+ name = { `policies.${ formik . values . policies . findIndex ( p => p === policy ) } .read` }
578+ disabled = {
579+ transactions . read_only ||
580+ ! hasAccess (
581+ editAccessRole ,
582+ user ,
583+ ) ||
584+ ( aclDefaults && aclDefaults [ "read_readonly" ] !== "false" )
585+ }
586+ className = { `${
587+ transactions . read_only
588+ ? "disabled"
589+ : "false"
590+ } `}
591+ onChange = { ( read : React . ChangeEvent < HTMLInputElement > ) =>
592+ replace ( formik . values . policies . findIndex ( p => p === policy ) , {
593+ ...policy ,
594+ read : read . target . checked ,
595+ } )
596+ }
597+ />
598+ </ td >
567599 < td className = "fit text-center" >
568600 < Field
569601 type = "checkbox"
@@ -658,7 +690,7 @@ export const AccessPolicyTable = <T extends AccessPolicyTabFormikProps>({
658690 { ! transactions . read_only &&
659691 hasAccess ( editAccessRole , user ) && (
660692 < tr >
661- < td colSpan = { 4 } >
693+ < td colSpan = { 5 } >
662694 < ButtonLikeAnchor
663695 onClick = { ( ) =>
664696 push ( createPolicy ( "" , isUserTable ) )
You can’t perform that action at this time.
0 commit comments