mirror of
https://github.com/datahub-project/datahub.git
synced 2025-11-03 12:16:10 +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,
|
||||
helpText,
|
||||
successUploading,
|
||||
invalidPolicyData
|
||||
invalidPolicyData,
|
||||
missingPurgePolicy
|
||||
} = 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
|
||||
* @param {number} step
|
||||
@ -889,7 +898,13 @@ export default Component.extend({
|
||||
* @return {void|Promise.<void>}
|
||||
*/
|
||||
didEditPurgePolicy() {
|
||||
if (isExempt(get(this, 'complianceInfo.complianceType'))) {
|
||||
const { complianceType } = get(this, 'complianceInfo');
|
||||
|
||||
if (!complianceType) {
|
||||
return this.needsPurgePolicyType();
|
||||
}
|
||||
|
||||
if (isExempt(complianceType)) {
|
||||
return this.showPurgeExemptionWarning();
|
||||
}
|
||||
},
|
||||
|
||||
@ -54,7 +54,8 @@ const compliancePolicyStrings = {
|
||||
classification:
|
||||
'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.'
|
||||
}
|
||||
},
|
||||
missingPurgePolicy: 'Please specify a Compliance Purge Policy'
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user