Skip to content

Commit

Permalink
[frontend] fix danger zone display in capabilities (#8284)
Browse files Browse the repository at this point in the history
  • Loading branch information
labo-flg authored Oct 4, 2024
1 parent 649af4f commit b2bd506
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const CapabilitiesList: FunctionComponent<CapabilitiesListProps> = ({

return (
<List>
{(isSensitiveModificationEnabled && role.can_manage_sensitive_config) && (
{(isSensitiveModificationEnabled && role.can_manage_sensitive_config !== false) && (
<ListItem
key="sensitive"
dense={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const RoleEditionCapabilitiesComponent: FunctionComponent<RoleEditionCapabilitie
<ListItemSecondaryAction>
<Checkbox
onChange={(event) => handleSensitiveToggle(event)}
checked={role.can_manage_sensitive_config ? role.can_manage_sensitive_config : false}
checked={role.can_manage_sensitive_config !== false} // beware: undefined value means access is granted
style={{ color: theme.palette.dangerZone.main }}
disabled={false}
/>
Expand Down

0 comments on commit b2bd506

Please sign in to comment.