webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js in katello-3.17.3 vs webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js in katello-3.18.0.rc1
- old
+ new
@@ -91,10 +91,11 @@
canImportManifest,
canDeleteManifest,
isManifestImported,
canEditOrganizations,
simpleContentAccess,
+ simpleContentAccessEligible,
enableSimpleContentAccess,
disableSimpleContentAccess,
taskInProgress,
manifestActionStarted,
} = this.props;
@@ -102,10 +103,12 @@
const actionInProgress = (taskInProgress || manifestActionStarted);
const showRedHatProviderDetails = canEditOrganizations;
const showSubscriptionManifest = (canImportManifest || canDeleteManifest);
const showManifestTab = (showRedHatProviderDetails || showSubscriptionManifest);
const disableSCASwitch = (
+ // allow users to turn SCA off even if they are not eligible to turn it back on
+ (!simpleContentAccessEligible && !simpleContentAccess) ||
disableManifestActions ||
!isManifestImported ||
actionInProgress ||
organization.loading
);
@@ -192,19 +195,22 @@
<FormGroup>
<Grid>
<h3>{__('Subscription Manifest')}</h3>
<hr />
+ { isManifestImported &&
+ <Row>
+ <SimpleContentAccess
+ enableSimpleContentAccess={enableSimpleContentAccess}
+ disableSimpleContentAccess={disableSimpleContentAccess}
+ isSimpleContentAccessEnabled={simpleContentAccess}
+ canToggleSimpleContentAccess={!disableSCASwitch}
+ simpleContentAccessEligible={simpleContentAccessEligible}
+ />
+ </Row>
+ }
<Row>
- <SimpleContentAccess
- enableSimpleContentAccess={enableSimpleContentAccess}
- disableSimpleContentAccess={disableSimpleContentAccess}
- isSimpleContentAccessEnabled={simpleContentAccess}
- canToggleSimpleContentAccess={!disableSCASwitch}
- />
- </Row>
- <Row>
<Col sm={5}>
<strong>{__('Subscription Allocation')}</strong>
</Col>
<Col sm={7}>
{getManifestName()}
@@ -323,10 +329,11 @@
disabledReason: PropTypes.string,
loadOrganization: PropTypes.func.isRequired,
saveOrganization: PropTypes.func.isRequired,
taskInProgress: PropTypes.bool.isRequired,
simpleContentAccess: PropTypes.bool,
+ simpleContentAccessEligible: PropTypes.bool,
manifestHistory: PropTypes.shape({
loading: PropTypes.bool,
// Disabling rule as existing code failed due to an eslint-plugin-react update
// eslint-disable-next-line react/forbid-prop-types
results: PropTypes.array,
@@ -342,9 +349,10 @@
canImportManifest: false,
canDeleteManifest: false,
isManifestImported: false,
canEditOrganizations: false,
simpleContentAccess: false,
+ simpleContentAccessEligible: undefined,
manifestActionStarted: false,
};
export default ManageManifestModal;