diff --git a/src/boot/routes.js b/src/boot/routes.js index 94c378c4..9f1906f2 100644 --- a/src/boot/routes.js +++ b/src/boot/routes.js @@ -36,8 +36,12 @@ export default ({ app, router, store }) => { if (to.meta?.profileAttribute) { const hasSubscriberProfileAttribute = store.getters['user/hasSubscriberProfileAttribute'](to.meta.profileAttribute) if (to.meta.license && hasSubscriberProfileAttribute) { - // Guard to assure that users cannot click on menu if - // it is mistakenly visible when the license is inactive + // Guard to assure that: + // CE users have access to all available menus as they do not have licenses + if (store.platformInfo.type === 'spce') { + next() + } + // users cannot click on menu if it is mistakenly visible when the license is inactive store.getters['user/isLicenseActive'](to.meta.license) ? next() : next('/') } diff --git a/src/components/CscMainMenuTop.vue b/src/components/CscMainMenuTop.vue index 0c30f85a..a6394a9e 100644 --- a/src/components/CscMainMenuTop.vue +++ b/src/components/CscMainMenuTop.vue @@ -51,7 +51,8 @@ export default { 'hasSubscriberProfileAttributes', 'isLicenseActive', 'isOldCSCProxyingAllowed', - 'isPbxEnabled' + 'isPbxEnabled', + 'isSpCe' ]), items () { return [ @@ -66,7 +67,7 @@ export default { icon: 'call', label: this.callStateTitle, sublabel: this.callStateSubtitle, - visible: this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.cscCalls) && this.isLicenseActive(LICENSES.csc_calls) + visible: this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.cscCalls && (this.isSpCe || this.isLicenseActive(LICENSES.csc_calls))) }, { to: '/user/conversations', @@ -138,7 +139,7 @@ export default { to: '/user/recordings', icon: 'play_circle', label: this.$t('Recordings'), - visible: this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.recordings) && this.isLicenseActive(LICENSES.call_recording) + visible: this.hasSubscriberProfileAttribute(PROFILE_ATTRIBUTE_MAP.recordings) && (this.isSpCe || this.isLicenseActive(LICENSES.call_recording)) } ] }, diff --git a/src/router/routes.js b/src/router/routes.js index 1e0d4ac4..8c70d6bd 100644 --- a/src/router/routes.js +++ b/src/router/routes.js @@ -434,7 +434,7 @@ const routes = [ return i18n.global.tc('Set your fax settings') }, profileAttribute: PROFILE_ATTRIBUTE_MAP.faxServer, - license: LICENSES.phonebook + license: LICENSES.fax } }, { diff --git a/src/store/user.js b/src/store/user.js index ba331a02..6669a281 100644 --- a/src/store/user.js +++ b/src/store/user.js @@ -210,6 +210,9 @@ export default { }, isPbxAttendant (state, getters) { return getters.isPbxPilot || getters.isPbxGroup || getters.isPbxSeat + }, + isSpCe (state) { + return state.platformInfo.type === 'spce' } }, mutations: {