WIP ESLint fixes
This commit is contained in:
@ -576,7 +576,7 @@ export function TokenRightsEditor(p: {
|
||||
right={{ verb: "GET", path: `/api/nwfilter/${v.uuid}` }}
|
||||
parent={{ verb: "GET", path: "/api/nwfilter/*" }}
|
||||
/>
|
||||
{ServerApi.Config.builtin_nwfilter_rules.includes(v.name!) ? (
|
||||
{ServerApi.Config.builtin_nwfilter_rules.includes(v.name) ? (
|
||||
<TableCell></TableCell>
|
||||
) : (
|
||||
<CellRight
|
||||
@ -585,7 +585,7 @@ export function TokenRightsEditor(p: {
|
||||
parent={{ verb: "PUT", path: "/api/nwfilter/*" }}
|
||||
/>
|
||||
)}
|
||||
{ServerApi.Config.builtin_nwfilter_rules.includes(v.name!) ? (
|
||||
{ServerApi.Config.builtin_nwfilter_rules.includes(v.name) ? (
|
||||
<TableCell></TableCell>
|
||||
) : (
|
||||
<CellRight
|
||||
@ -767,7 +767,7 @@ function RouteRight(p: RightOpts): React.ReactElement {
|
||||
const parentActivated =
|
||||
!!p.parent &&
|
||||
p.token.rights.findIndex(
|
||||
(r) => r.verb === p.parent?.verb && r.path === p.parent?.path
|
||||
(r) => r.verb === p.parent?.verb && r.path === p.parent.path
|
||||
) !== -1;
|
||||
|
||||
const toggle = (a: boolean) => {
|
||||
@ -804,7 +804,7 @@ function RouteRight(p: RightOpts): React.ReactElement {
|
||||
<Checkbox
|
||||
checked={activated || parentActivated}
|
||||
disabled={!p.editable || parentActivated}
|
||||
onChange={(_e, a) => toggle(a)}
|
||||
onChange={(_e, a) => { toggle(a); }}
|
||||
/>
|
||||
}
|
||||
label={p.label}
|
||||
@ -814,7 +814,7 @@ function RouteRight(p: RightOpts): React.ReactElement {
|
||||
<Checkbox
|
||||
checked={activated || parentActivated}
|
||||
disabled={!p.editable || parentActivated}
|
||||
onChange={(_e, a) => toggle(a)}
|
||||
onChange={(_e, a) => { toggle(a); }}
|
||||
/>
|
||||
</span>
|
||||
)}
|
||||
|
Reference in New Issue
Block a user