diff --git a/client/auth/src/auth.js b/client/auth/src/auth.js index 703c81193..8b7c022dd 100644 --- a/client/auth/src/auth.js +++ b/client/auth/src/auth.js @@ -1,3 +1,3 @@ import './ngModule'; import './config'; -import './login/index'; +import './login/login'; diff --git a/client/auth/src/login/index.html b/client/auth/src/login/login.html old mode 100755 new mode 100644 similarity index 100% rename from client/auth/src/login/index.html rename to client/auth/src/login/login.html diff --git a/client/auth/src/login/index.js b/client/auth/src/login/login.js similarity index 98% rename from client/auth/src/login/index.js rename to client/auth/src/login/login.js index 7c7447d73..229c1a345 100644 --- a/client/auth/src/login/index.js +++ b/client/auth/src/login/login.js @@ -76,6 +76,6 @@ export default class Controller { Controller.$inject = ['$element', '$scope', '$window', '$http']; ngModule.component('vnLogin', { - template: require('./index.html'), + template: require('./login.html'), controller: Controller }); diff --git a/client/client/src/address-create/index.html b/client/client/src/address-create/address-create.html similarity index 100% rename from client/client/src/address-create/index.html rename to client/client/src/address-create/address-create.html diff --git a/client/client/src/address-create/index.js b/client/client/src/address-create/address-create.js similarity index 92% rename from client/client/src/address-create/index.js rename to client/client/src/address-create/address-create.js index 7626ea5a8..8e23af6ea 100644 --- a/client/client/src/address-create/index.js +++ b/client/client/src/address-create/address-create.js @@ -19,7 +19,7 @@ Controller.$inject = ['$scope', '$state']; export const NAME = 'vnAddressCreate'; export const COMPONENT = { - template: require('./index.html'), + template: require('./address-create.html'), controller: Controller }; module.component(NAME, COMPONENT); diff --git a/client/client/src/address-edit/index.html b/client/client/src/address-edit/address-edit.html similarity index 100% rename from client/client/src/address-edit/index.html rename to client/client/src/address-edit/address-edit.html diff --git a/client/client/src/address-edit/index.js b/client/client/src/address-edit/address-edit.js similarity index 88% rename from client/client/src/address-edit/index.js rename to client/client/src/address-edit/address-edit.js index 70f609d2d..1e4fdb600 100644 --- a/client/client/src/address-edit/index.js +++ b/client/client/src/address-edit/address-edit.js @@ -11,7 +11,7 @@ Controller.$inject = ['$stateParams']; export const NAME = 'vnAddressEdit'; export const COMPONENT = { - template: require('./index.html'), + template: require('./address-edit.html'), controllerAs: 'addressData', controller: Controller }; diff --git a/client/client/src/addresses/index.html b/client/client/src/addresses/addresses.html similarity index 100% rename from client/client/src/addresses/index.html rename to client/client/src/addresses/addresses.html diff --git a/client/client/src/addresses/index.js b/client/client/src/addresses/addresses.js similarity index 73% rename from client/client/src/addresses/index.js rename to client/client/src/addresses/addresses.js index 0c0dc0846..be0e6f398 100644 --- a/client/client/src/addresses/index.js +++ b/client/client/src/addresses/addresses.js @@ -1,6 +1,6 @@ import {module} from '../module'; export const component = { - template: require('./index.html') + template: require('./addresses.html') }; module.component('vnClientAddresses', component); diff --git a/client/client/src/basic-data/index.html b/client/client/src/basic-data/basic-data.html similarity index 100% rename from client/client/src/basic-data/index.html rename to client/client/src/basic-data/basic-data.html diff --git a/client/client/src/basic-data/index.js b/client/client/src/basic-data/basic-data.js similarity index 78% rename from client/client/src/basic-data/index.js rename to client/client/src/basic-data/basic-data.js index 2e3dececc..de05dd81a 100644 --- a/client/client/src/basic-data/index.js +++ b/client/client/src/basic-data/basic-data.js @@ -1,7 +1,7 @@ import {module} from '../module'; export const component = { - template: require('./index.html'), + template: require('./basic-data.html'), bindings: { client: '<' } diff --git a/client/client/src/billing-data/index.html b/client/client/src/billing-data/billing-data.html similarity index 100% rename from client/client/src/billing-data/index.html rename to client/client/src/billing-data/billing-data.html diff --git a/client/client/src/billing-data/index.js b/client/client/src/billing-data/billing-data.js similarity index 82% rename from client/client/src/billing-data/index.js rename to client/client/src/billing-data/billing-data.js index 7c6c6ffeb..7c70b46af 100644 --- a/client/client/src/billing-data/index.js +++ b/client/client/src/billing-data/billing-data.js @@ -2,7 +2,7 @@ import {module} from '../module'; export const NAME = 'vnClientBillingData'; export const COMPONENT = { - template: require('./index.html'), + template: require('./billing-data.html'), controllerAs: 'bill', bindings: { client: '<' diff --git a/client/client/src/card/index.html b/client/client/src/card/card.html similarity index 100% rename from client/client/src/card/index.html rename to client/client/src/card/card.html diff --git a/client/client/src/card/index.js b/client/client/src/card/card.js similarity index 87% rename from client/client/src/card/index.js rename to client/client/src/card/card.js index 107aa9815..43d19facf 100644 --- a/client/client/src/card/index.js +++ b/client/client/src/card/card.js @@ -11,7 +11,7 @@ export default class vnClientCard { module.component(NAME, { - template: require('./index.html'), + template: require('./card.html'), controllerAs: 'card', controller: vnClientCard }); diff --git a/client/client/src/client.js b/client/client/src/client.js index 4bc822059..1ae857fa4 100644 --- a/client/client/src/client.js +++ b/client/client/src/client.js @@ -1,27 +1,27 @@ export * from './module'; export {NAME as CLIENT_CARD, - COMPONENT as CLIENT_CARD_COMPONENT} from './card/index'; + COMPONENT as CLIENT_CARD_COMPONENT} from './card/card'; export {NAME as CLIENTS, COMPONENT as CLIENTS_COMPONENT} from './index/index'; export {NAME as CLIENT_FISCAL_DATA_INDEX, - COMPONENT as CLIENT_FISCAL_DATA_INDEX_COMPONENT} from './fiscal-data/index'; + COMPONENT as CLIENT_FISCAL_DATA_INDEX_COMPONENT} from './fiscal-data/fiscal-data'; export {NAME as CLIENT_BILLING_DATA_INDEX, - COMPONENT as CLIENT_BILLINGL_DATA_INDEX_COMPONENT} from './billing-data/index'; + COMPONENT as CLIENT_BILLINGL_DATA_INDEX_COMPONENT} from './billing-data/billing-data'; export {NAME as CLIENT_DESCRIPTOR, - COMPONENT as CLIENT_DESCRIPTOR_COMPONENT} from './descriptor/index'; + COMPONENT as CLIENT_DESCRIPTOR_COMPONENT} from './descriptor/descriptor'; export {NAME as CLIENT_NOTES, - COMPONENT as CLIENT_NOTES_COMPONENT} from './notes/index'; + COMPONENT as CLIENT_NOTES_COMPONENT} from './notes/notes'; export {NAME as CLIENT_SEARCH_PANEL, - COMPONENT as CLIENT_SEARCH_PANEL_COMPONENT} from './search-panel/index'; + COMPONENT as CLIENT_SEARCH_PANEL_COMPONENT} from './search-panel/search-panel'; export {NAME as CLIENT_CREATE, - COMPONENT as CLIENT_CREATE_COMPONENT} from './create/index'; + COMPONENT as CLIENT_CREATE_COMPONENT} from './create/create'; export {NAME as CLIENT_ADDRESS_EDIT_INDEX, - COMPONENT as CLIENT_ADDRESS_EDIT_INDEX_COMPONENT} from './address-edit/index'; + COMPONENT as CLIENT_ADDRESS_EDIT_INDEX_COMPONENT} from './address-edit/address-edit'; export {NAME as NEW_NOTE_INDEX, - COMPONENT as NEW_NOTE_INDEX_COMPONENT} from './new-note/index'; + COMPONENT as NEW_NOTE_INDEX_COMPONENT} from './new-note/new-note'; -import './addresses/index'; -import './address-create/index'; -import './basic-data/index'; -import './web-access/index'; +import './addresses/addresses'; +import './address-create/address-create'; +import './basic-data/basic-data'; +import './web-access/web-access'; diff --git a/client/client/src/create/index.html b/client/client/src/create/create.html similarity index 100% rename from client/client/src/create/index.html rename to client/client/src/create/create.html diff --git a/client/client/src/create/index.js b/client/client/src/create/create.js similarity index 92% rename from client/client/src/create/index.js rename to client/client/src/create/create.js index f42583d25..bdf825481 100644 --- a/client/client/src/create/index.js +++ b/client/client/src/create/create.js @@ -17,7 +17,7 @@ class Controller { Controller.$inject = ['$scope', '$state']; export const component = { - template: require('./index.html'), + template: require('./create.html'), controller: Controller }; module.component('vnClientCreate', component); diff --git a/client/client/src/descriptor/index.html b/client/client/src/descriptor/descriptor.html similarity index 100% rename from client/client/src/descriptor/index.html rename to client/client/src/descriptor/descriptor.html diff --git a/client/client/src/descriptor/index.js b/client/client/src/descriptor/descriptor.js similarity index 92% rename from client/client/src/descriptor/index.js rename to client/client/src/descriptor/descriptor.js index 8c2da7404..a9c5722ec 100644 --- a/client/client/src/descriptor/index.js +++ b/client/client/src/descriptor/descriptor.js @@ -3,7 +3,7 @@ import './style.css'; export const NAME = 'vnDescriptor'; export const COMPONENT = { - template: require('./index.html'), + template: require('./descriptor.html'), controllerAs: 'descriptor', bindings: { client: '<', diff --git a/client/client/src/fiscal-data/index.html b/client/client/src/fiscal-data/fiscal-data.html similarity index 100% rename from client/client/src/fiscal-data/index.html rename to client/client/src/fiscal-data/fiscal-data.html diff --git a/client/client/src/fiscal-data/index.js b/client/client/src/fiscal-data/fiscal-data.js similarity index 82% rename from client/client/src/fiscal-data/index.js rename to client/client/src/fiscal-data/fiscal-data.js index d6ece6020..db96d82a5 100644 --- a/client/client/src/fiscal-data/index.js +++ b/client/client/src/fiscal-data/fiscal-data.js @@ -2,7 +2,7 @@ import {module} from '../module'; export const NAME = 'vnClientFiscalData'; export const COMPONENT = { - template: require('./index.html'), + template: require('./fiscal-data.html'), controllerAs: 'fiscal', bindings: { client: '<' diff --git a/client/client/src/new-note/index.html b/client/client/src/new-note/new-note.html similarity index 100% rename from client/client/src/new-note/index.html rename to client/client/src/new-note/new-note.html diff --git a/client/client/src/new-note/index.js b/client/client/src/new-note/new-note.js similarity index 94% rename from client/client/src/new-note/index.js rename to client/client/src/new-note/new-note.js index d69fa470e..8138990b5 100644 --- a/client/client/src/new-note/index.js +++ b/client/client/src/new-note/new-note.js @@ -1,4 +1,4 @@ -import template from './index.html'; +import template from './new-note.html'; import {module} from '../module'; class Controller { diff --git a/client/client/src/notes/index.html b/client/client/src/notes/notes.html similarity index 100% rename from client/client/src/notes/index.html rename to client/client/src/notes/notes.html diff --git a/client/client/src/notes/index.js b/client/client/src/notes/notes.js similarity index 96% rename from client/client/src/notes/index.js rename to client/client/src/notes/notes.js index d7fc78bf1..d5482bcb1 100644 --- a/client/client/src/notes/index.js +++ b/client/client/src/notes/notes.js @@ -1,5 +1,5 @@ import './style.css'; -import template from './index.html'; +import template from './notes.html'; import {module} from '../module'; export const NAME = 'vnClientNotes'; diff --git a/client/client/src/search-panel/index.html b/client/client/src/search-panel/search-panel.html similarity index 100% rename from client/client/src/search-panel/index.html rename to client/client/src/search-panel/search-panel.html diff --git a/client/client/src/search-panel/index.js b/client/client/src/search-panel/search-panel.js similarity index 95% rename from client/client/src/search-panel/index.js rename to client/client/src/search-panel/search-panel.js index bf8af3c03..c809bc615 100644 --- a/client/client/src/search-panel/index.js +++ b/client/client/src/search-panel/search-panel.js @@ -2,7 +2,7 @@ import {module} from '../module'; export const NAME = 'vnClientSearchPanel'; export const COMPONENT = { - template: require('./index.html'), + template: require('./search-panel.html'), controller: function($scope, $window) { this.filter = {id: null, fi: null, name: null, socialName: null, city: null, postcode: null, email: null, phone: null}; this.formVisibility = true; diff --git a/client/client/src/web-access/index.js b/client/client/src/web-access/index.js deleted file mode 100644 index d7f444af4..000000000 --- a/client/client/src/web-access/index.js +++ /dev/null @@ -1,48 +0,0 @@ -import {module} from '../module'; - -class Controller { - constructor($scope, $http, vnAppLogger) { - this.$scope = $scope; - this.$http = $http; - this.vnAppLogger = vnAppLogger; - } - $onChanges() { - if(this.client) - this.account = this.client.account; - } - onPassOpen() { - this.newPassword = ''; - this.repeatPassword = ''; - this.$scope.$apply(); - } - onPassChange(response) { - if(response == 'ACCEPT') - try { - if(!this.newPassword) - throw new Error(`Passwords can't be empty`); - if(this.newPassword != this.repeatPassword) - throw new Error(`Passwords don't match`); - - let account = { - password: this.newPassword - }; - - this.$http.put(`/client/api/Accounts/${this.client.id}`, account); - } - catch(e) { - this.vnAppLogger.showError(e.message); - return false; - } - - return true; - } -} -Controller.$inject = ['$scope', '$http', 'vnAppLogger']; - -module.component('vnClientWebAccess', { - template: require('./index.html'), - bindings: { - client: '<' - }, - controller: Controller -}); diff --git a/client/client/src/web-access/index.html b/client/client/src/web-access/web-access.html similarity index 100% rename from client/client/src/web-access/index.html rename to client/client/src/web-access/web-access.html diff --git a/client/client/src/web-access/web-access.js b/client/client/src/web-access/web-access.js new file mode 100644 index 000000000..413d80059 --- /dev/null +++ b/client/client/src/web-access/web-access.js @@ -0,0 +1,46 @@ +import {module} from '../module'; + +class Controller { + constructor($scope, $http, vnAppLogger) { + this.$scope = $scope; + this.$http = $http; + this.vnAppLogger = vnAppLogger; + } + $onChanges() { + if (this.client) + this.account = this.client.account; + } + onPassOpen() { + this.newPassword = ''; + this.repeatPassword = ''; + this.$scope.$apply(); + } + onPassChange(response) { + if (response == 'ACCEPT') + try { + if (!this.newPassword) + throw new Error(`Passwords can't be empty`); + if (this.newPassword != this.repeatPassword) + throw new Error(`Passwords don't match`); + let account = { + password: this.newPassword + }; + + this.$http.put(`/client/api/Accounts/${this.client.id}`, account); + } catch (e) { + this.vnAppLogger.showError(e.message); + return false; + } + + return true; + } +} +Controller.$inject = ['$scope', '$http', 'vnAppLogger']; + +module.component('vnClientWebAccess', { + template: require('./web-access.html'), + bindings: { + client: '<' + }, + controller: Controller +}); diff --git a/client/core/src/autocomplete/index.html b/client/core/src/autocomplete/autocomplete.html similarity index 100% rename from client/core/src/autocomplete/index.html rename to client/core/src/autocomplete/autocomplete.html diff --git a/client/core/src/autocomplete/index.js b/client/core/src/autocomplete/autocomplete.js similarity index 99% rename from client/core/src/autocomplete/index.js rename to client/core/src/autocomplete/autocomplete.js index 2cd088c9b..c46fcebf7 100644 --- a/client/core/src/autocomplete/index.js +++ b/client/core/src/autocomplete/autocomplete.js @@ -400,7 +400,7 @@ export default class Autocomplete extends Component { Autocomplete.$inject = ['$element', '$scope', '$http', 'vnPopover', '$transclude']; module.component('vnAutocomplete', { - template: require('./index.html'), + template: require('./autocomplete.html'), bindings: { url: '@', showField: '@?', diff --git a/client/core/src/components.js b/client/core/src/components.js index 5c631ab04..074434bd9 100644 --- a/client/core/src/components.js +++ b/client/core/src/components.js @@ -4,11 +4,12 @@ import './styles/fonts/mdi-override.css'; import './textfield/index'; import './watcher/index'; import './paging/index'; -import './icon/index'; -import './autocomplete/index'; +import './icon/icon'; +import './autocomplete/autocomplete'; import './popover/index'; -import './dialog/index'; -import './confirm/index'; +import './dialog/dialog'; + +import './confirm/confirm'; import './title/index'; import './subtitle/index'; import './spinner/index'; diff --git a/client/core/src/confirm/index.html b/client/core/src/confirm/confirm.html similarity index 100% rename from client/core/src/confirm/index.html rename to client/core/src/confirm/confirm.html diff --git a/client/core/src/confirm/index.js b/client/core/src/confirm/confirm.js similarity index 78% rename from client/core/src/confirm/index.js rename to client/core/src/confirm/confirm.js index 0d7c56cc0..f629fe788 100644 --- a/client/core/src/confirm/index.js +++ b/client/core/src/confirm/confirm.js @@ -1,12 +1,12 @@ import {module} from '../module'; -import Dialog from '../dialog/index'; +import Dialog from '../dialog/dialog'; import './style.css'; export default class Confirm extends Dialog {} Dialog.$inject = ['$element']; module.component('vnConfirm', { - template: require('./index.html'), + template: require('./confirm.html'), bindings: { onResponse: '&', question: '@', diff --git a/client/core/src/dialog/index.html b/client/core/src/dialog/dialog.html similarity index 100% rename from client/core/src/dialog/index.html rename to client/core/src/dialog/dialog.html diff --git a/client/core/src/dialog/index.js b/client/core/src/dialog/dialog.js similarity index 98% rename from client/core/src/dialog/index.js rename to client/core/src/dialog/dialog.js index e45f66b93..e2be65799 100644 --- a/client/core/src/dialog/index.js +++ b/client/core/src/dialog/dialog.js @@ -98,7 +98,7 @@ export default class Dialog extends Component { Dialog.$inject = ['$element']; module.component('vnDialog', { - template: require('./index.html'), + template: require('./dialog.html'), transclude: { tplBody: 'tplBody', tplButtons: 'tplButtons' diff --git a/client/core/src/directives/dialog.js b/client/core/src/directives/dialog.js index b4baac7f3..d4ac65b45 100644 --- a/client/core/src/directives/dialog.js +++ b/client/core/src/directives/dialog.js @@ -1,5 +1,5 @@ import {module} from '../module'; -import Dialog from '../dialog/index'; +import Dialog from '../dialog/dialog'; import {kebabToCamel} from '../lib/string'; /** diff --git a/client/core/src/icon/index.js b/client/core/src/icon/icon.js similarity index 95% rename from client/core/src/icon/index.js rename to client/core/src/icon/icon.js index 7e36fab97..31e9ca565 100644 --- a/client/core/src/icon/index.js +++ b/client/core/src/icon/icon.js @@ -1,5 +1,5 @@ import {module} from '../module'; -import './index.mdl'; +import './icon.mdl'; import './style.css'; import * as resolveFactory from '../lib/resolveDefaultComponents'; diff --git a/client/core/src/icon/index.mdl.html b/client/core/src/icon/icon.mdl.html similarity index 100% rename from client/core/src/icon/index.mdl.html rename to client/core/src/icon/icon.mdl.html diff --git a/client/core/src/icon/index.mdl.js b/client/core/src/icon/icon.mdl.js similarity index 83% rename from client/core/src/icon/index.mdl.js rename to client/core/src/icon/icon.mdl.js index 3084fdd12..ce3f82856 100644 --- a/client/core/src/icon/index.mdl.js +++ b/client/core/src/icon/icon.mdl.js @@ -1,5 +1,5 @@ import {module} from '../module'; -import template from './index.mdl.html'; +import template from './icon.mdl.html'; export const NAME = 'vnIconMdlFactory'; export function factory() { diff --git a/client/salix/src/aclService.js b/client/salix/src/aclService.js index aeb8b0129..63e75278c 100644 --- a/client/salix/src/aclService.js +++ b/client/salix/src/aclService.js @@ -1,10 +1,14 @@ import ngModule from './module'; -function aclService() { - this.roles = window.Salix.acl.roles; +aclService.$inject = ['aclConstant']; +function aclService(aclConstant) { + this.roles = aclConstant.roles || undefined; + this.routeHasPermission = function(route) { let hasPermission; - if (!route.acl) + if (!this.roles) + hasPermission = false; + else if (!route.acl) hasPermission = true; else if (!this.roles || !Object.keys(this.roles).length) hasPermission = false; diff --git a/client/salix/src/bootstrap.js b/client/salix/src/bootstrap.js index b0a57a215..dd7a61388 100644 --- a/client/salix/src/bootstrap.js +++ b/client/salix/src/bootstrap.js @@ -1,5 +1,5 @@ import {ng} from 'vendor'; -import './module'; +import appName from './module'; export const bootstrap = () => { const selector = 'selector'; @@ -13,5 +13,5 @@ export const bootstrap = () => { if (!_element) { throw new Error('Element is not defined'); } - ng.bootstrap(_element, ['salix']); + ng.bootstrap(_element, [appName]); }; diff --git a/client/salix/src/components/app/app.js b/client/salix/src/components/app/app.js index c20c448ee..18742e9f4 100644 --- a/client/salix/src/components/app/app.js +++ b/client/salix/src/components/app/app.js @@ -1,4 +1,4 @@ -import ngModule from '../../module'; +import ngModule, {appName} from '../../module'; import './style.scss'; export const NAME = 'vnApp'; @@ -76,4 +76,6 @@ function interceptorConfig($httpProvider) { } ngModule.config(interceptorConfig); +var acl = window[appName] ? window[appName].acl : {}; +ngModule.constant('aclConstant', acl); diff --git a/client/salix/src/config.js b/client/salix/src/config.js index 92b8f5efd..877d16730 100644 --- a/client/salix/src/config.js +++ b/client/salix/src/config.js @@ -1,8 +1,8 @@ -import ngModule from './module'; +import ngModule, {appName} from './module'; config.$inject = ['$translatePartialLoaderProvider']; export function config($translatePartialLoaderProvider) { - $translatePartialLoaderProvider.addPart('salix'); + $translatePartialLoaderProvider.addPart(appName); } ngModule.config(config); diff --git a/client/salix/src/module.js b/client/salix/src/module.js index d0c4657a9..568a43d69 100644 --- a/client/salix/src/module.js +++ b/client/salix/src/module.js @@ -1,5 +1,6 @@ import {ng} from 'vendor'; import 'core'; -const ngModule = ng.module('salix', ['vnCore']); +export const appName = 'salix'; +const ngModule = ng.module(appName, ['vnCore']); export default ngModule; diff --git a/services/client/common/scopes/client/card.json b/services/client/common/scopes/client/card.json index 84ca960d6..332a0409b 100644 --- a/services/client/common/scopes/client/card.json +++ b/services/client/common/scopes/client/card.json @@ -1,43 +1,57 @@ [ { - "relation": "salesPerson", - "scope":{ - "fields": { - "id": true, "name": true - } + "relation": "salesPerson", + "scope": { + "fields": [ + "id", + "name" + ] } }, { - "relation": "contactChannel", - "scope":{ - "fields": { - "id": true, "name": true - } + "relation": "contactChannel", + "scope": { + "fields": [ + "id", + "name" + ] } }, { - "relation": "province", - "scope":{ - "fields": { - "id": true, "name": true - } + "relation": "province", + "scope": { + "fields": [ + "id", + "name" + ] } }, { - "relation": "country", - "scope":{ - "fields": { - "id": true, "name": true - } + "relation": "country", + "scope": { + "fields": [ + "id", + "name" + ] } }, { - "relation": "payMethod", - "scope":{ - "fields": { - "id": true, "name": true - } + "relation": "payMethod", + "scope": { + "fields": [ + "id", + "name" + ] + } + }, + { + "relation": "account", + "scope": { + "fields": [ + "id", + "name", + "active" + ] } } -] - +] \ No newline at end of file diff --git a/services/salix/server/boot/routes.js b/services/salix/server/boot/routes.js index 10ce5dd4b..cbd83d2c1 100644 --- a/services/salix/server/boot/routes.js +++ b/services/salix/server/boot/routes.js @@ -113,7 +113,7 @@ module.exports = function (app) { function sendACL(res, acl){ let aclStr = JSON.stringify(acl); res.header('Content-Type', 'application/javascript; charset=UTF-8'); - res.send(`(function(window){window.Salix = window.Salix || {}; window.Salix.acl = window.Salix.acl || {}; window.Salix.acl = ${aclStr}; })(window)`); + res.send(`(function(window){window.salix = window.salix || {}; window.salix.acl = window.salix.acl || {}; window.salix.acl = ${aclStr}; })(window)`); } };