Client:PortalSettings:OAuth2: hide write checkbox for openid

This commit is contained in:
Timofey Boyko 2023-12-05 13:30:12 +03:00
parent 55d7dbcd64
commit 71c42ce188

View File

@ -171,17 +171,19 @@ const ScopesBlock = ({
/>
</StyledScopesCheckbox>
<StyledScopesCheckbox>
<Checkbox
isChecked={isReadDisabled}
isDisabled={isEdit || !scope.read?.name}
onChange={() =>
onAddCheckedScope(
key as ScopeGroup,
ScopeType.write,
scope.write.name
)
}
/>
{scope.read?.name && (
<Checkbox
isChecked={isReadDisabled}
isDisabled={isEdit || !scope.read?.name}
onChange={() =>
onAddCheckedScope(
key as ScopeGroup,
ScopeType.write,
scope.write.name
)
}
/>
)}
</StyledScopesCheckbox>
</React.Fragment>
);