fixes issue with file upload of compliance json on save attempt

This commit is contained in:
Seyi Adebajo 2017-06-12 17:57:53 -07:00 committed by Mars Lan
parent 98ffbfb65f
commit 08e12d886f

View File

@ -34,11 +34,13 @@ const hiddenTrackingFieldsMsg = htmlSafe(
'Hopefully, this saves you some scrolling!</p>' 'Hopefully, this saves you some scrolling!</p>'
); );
const helpText = { const helpText = {
classification: 'The default value is taken from go/dht and should be good enough in most cases. ' + classification:
'You can optionally override it if required by house security.', 'The default value is taken from go/dht and should be good enough in most cases. ' +
subjectOwner: 'Member ID (Subject Owner): Choose this option if the member specified here is not the owner of this ' + 'You can optionally override it if required by house security.',
'record, e.g. the profile ID viewed, or recipient ID of a message. See wiki for more explanation. ' + subjectOwner:
'Mixed ID: Choose this option if the field is a URN containing a mixture of member, organization, or group ID.' 'Member ID (Subject Owner): Choose this option if the member specified here is not the owner of this ' +
'record, e.g. the profile ID viewed, or recipient ID of a message. See wiki for more explanation. ' +
'Mixed ID: Choose this option if the field is a URN containing a mixture of member, organization, or group ID.'
}; };
/** /**
@ -329,8 +331,9 @@ export default Component.extend({
isFieldFormatDisabled: isMixed || isCustom, isFieldFormatDisabled: isMixed || isCustom,
identifierType: computedIdentifierType, identifierType: computedIdentifierType,
// Check specific use case for urn only field format / logicalType // Check specific use case for urn only field format / logicalType
classification: fieldClassification[identifierField] || classification:
(isMixed && defaultFieldDataTypeClassification[urnFieldFormat.value]), fieldClassification[identifierField] ||
(isMixed && defaultFieldDataTypeClassification[urnFieldFormat.value]),
// Same object reference for equality comparision // Same object reference for equality comparision
logicalType: logicalTypeObject logicalType: logicalTypeObject
}; };
@ -346,9 +349,7 @@ export default Component.extend({
checkEachEntityByLogicalType: (sourceEntities = [], logicalTypes = []) => checkEachEntityByLogicalType: (sourceEntities = [], logicalTypes = []) =>
sourceEntities.every( sourceEntities.every(
({ logicalType }) => ({ logicalType }) =>
(typeof logicalType === 'object' typeof logicalType === 'object' ? logicalTypes.includes(logicalType.value) : logicalTypes.includes(logicalType)
? logicalTypes.includes(logicalType.value)
: logicalTypes.includes(logicalType))
), ),
/** /**
@ -473,7 +474,7 @@ export default Component.extend({
set(this, 'complianceInfo', Object.assign({}, currentPolicy, policy)); set(this, 'complianceInfo', Object.assign({}, currentPolicy, policy));
// If all is good, then we can saveCompliance so user does not have to manually click // If all is good, then we can saveCompliance so user does not have to manually click
return this.saveCompliance(); return this.actions.saveCompliance();
} }
alert('Received policy in an unexpected format! Please check the provided attributes and try again.'); alert('Received policy in an unexpected format! Please check the provided attributes and try again.');