"use strict"; /** * Licensed Materials - Property of IBM * IBM Cognos Products: admin * Copyright IBM Corp. 2018 * US Government Users Restricted Rights -Use, duplication or disclosure * restricted by GSA ADP Schedule Contract with IBM Corp. */ define(['underscore', 'bi/admin/common/services/BaseCustomizationService', 'bi/admin/common/utils/AJAXUtils', 'bi/admin/nls/StringResource'], function (_, BaseCustomizationService, AJAXUtils, StringResource) { 'use strict'; //NOSONAR: meant to be strict var SystemCustomizationService = BaseCustomizationService.extend({ init: function init(options) { SystemCustomizationService.inherited('init', this, arguments); _.extend(this, options); this._roleRank = null; }, getCustomizations: function getCustomizations() { return this._getCustomizations(AJAXUtils.getPath("getSystemProfileSettings")); }, saveCustomizations: function saveCustomizations() { return Promise.try(function () { return this._saveCustomizations(AJAXUtils.getPath("getSystemProfileSettings")); }.bind(this)); }, _getCustomizationsWithDefaults: function _getCustomizationsWithDefaults() { var returnValue = { 'ui_theme': StringResource.get('default'), 'ui_homePage': { 'perspective': StringResource.get('default') }, 'ui_excludedFeatures': {}, 'ui_teamFolders': {}, 'parameter_values': {}, "parameters": {}, 'fileUpload_location': null }; if (this._customizations) { Object.keys(returnValue).forEach(this._replaceDefaultsWCustomValues.bind(this, returnValue, this._customizations)); } return returnValue; } }); SystemCustomizationService.DEFAULT = StringResource.get('default'); return SystemCustomizationService; });