"use strict"; /* *+------------------------------------------------------------------------+ *| Licensed Materials - Property of IBM *| IBM Cognos Products: BI Content Explorer *| (C) Copyright IBM Corp. 2017 *| *| US Government Users Restricted Rights - Use, duplication or disclosure *| restricted by GSA ADP Schedule Contract with IBM Corp. *+------------------------------------------------------------------------+ */ define(['q', 'bi/content_apps/common/PolicyPropertyView'], function (Q, CAPolicyPropertyView) { 'use strict'; //NOSONAR var PolicyPropertyView = CAPolicyPropertyView.extend({ init: function init(options) { PolicyPropertyView.inherited('init', this, arguments); }, _getObject: function _getObject() { if (this.isNew) { var newPermissions = { data: [{ policies: [] }] }; var aDef = Q.defer(); aDef.resolve(newPermissions); return aDef.promise; } else { return PolicyPropertyView.inherited('_getObject', this, arguments); } }, _sendRequest: function _sendRequest(options, successHandler) { if (this.isNew || this.oData.data[0].type === 'dataSourceSignon') { $(this).trigger("policiesChanged", options); var aDef = Q.defer(); aDef.resolve(); return aDef.promise; } else { return PolicyPropertyView.inherited('_sendRequest', this, arguments); } } }); return PolicyPropertyView; });