mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-07 06:13:40 +00:00
adds missing purge policy notification in compliance policy update wizard flow
This commit is contained in:
parent
788ce80172
commit
fe1acff599
@ -44,7 +44,8 @@ const {
|
|||||||
failedUpdating,
|
failedUpdating,
|
||||||
helpText,
|
helpText,
|
||||||
successUploading,
|
successUploading,
|
||||||
invalidPolicyData
|
invalidPolicyData,
|
||||||
|
missingPurgePolicy
|
||||||
} = compliancePolicyStrings;
|
} = compliancePolicyStrings;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -774,6 +775,14 @@ export default Component.extend({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Notifies the user to provide a missing purge policy
|
||||||
|
* @return {Promise<never>}
|
||||||
|
*/
|
||||||
|
needsPurgePolicyType() {
|
||||||
|
return Promise.reject(get(this, 'notifications').notify('error', { content: missingPurgePolicy }));
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates the currently active step in the edit sequence
|
* Updates the currently active step in the edit sequence
|
||||||
* @param {number} step
|
* @param {number} step
|
||||||
@ -889,7 +898,13 @@ export default Component.extend({
|
|||||||
* @return {void|Promise.<void>}
|
* @return {void|Promise.<void>}
|
||||||
*/
|
*/
|
||||||
didEditPurgePolicy() {
|
didEditPurgePolicy() {
|
||||||
if (isExempt(get(this, 'complianceInfo.complianceType'))) {
|
const { complianceType } = get(this, 'complianceInfo');
|
||||||
|
|
||||||
|
if (!complianceType) {
|
||||||
|
return this.needsPurgePolicyType();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isExempt(complianceType)) {
|
||||||
return this.showPurgeExemptionWarning();
|
return this.showPurgeExemptionWarning();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -54,7 +54,8 @@ const compliancePolicyStrings = {
|
|||||||
classification:
|
classification:
|
||||||
'This security classification is from go/dht and should be good enough in most cases. ' +
|
'This security classification is from go/dht and should be good enough in most cases. ' +
|
||||||
'You can optionally override it if required by house security.'
|
'You can optionally override it if required by house security.'
|
||||||
}
|
},
|
||||||
|
missingPurgePolicy: 'Please specify a Compliance Purge Policy'
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user