MT#61383 Allow admin PBX users to toggle Mail2Fax feature

Updated access rules for ADMIN subscribers:
- "Fax Settings > Mail to Fax" is now always visible.
  * Admin users: The "ACTIVE" toggle can be changed,
  and content is editable.
  * Non-Admin users: The "ACTIVE" toggle cannot be changed,
  and content is editable.
- "PBX Configuration > Seats > ID > Fax Settings > Mail to Fax" is
  now always visible
  * Admin users: The "ACTIVE" toggle can now be changed,
  and content is editable.
  * Non-Admin users: menu not visible

Change-Id: I1f30be27fde8a20092d8321e128f5d27dceec734
master
Debora Crescenzo 2 months ago committed by Crescenzo Debora
parent bc75777bae
commit bd086f4ca1

@ -1,17 +1,5 @@
<template>
<div
v-if="!mailToFaxSettingsModel.active"
class="q-pa-md"
>
<csc-spinner
v-if="loadingMail2FaxSettings"
class="self-center"
/>
<div v-else>
{{ $t('Mail To Fax feature is not active') }}
</div>
</div>
<div v-else>
<div>
<q-list
class="col col-xs-12 col-md-6"
dense
@ -21,7 +9,8 @@
<q-toggle
:model-value="mailToFaxSettingsModel.active"
:label="$t('Active')"
:disable="true"
:disable="disableToggle"
@update:model-value="setChangedData('active', !mailToFaxSettingsModel.active)"
/>
</q-item-section>
<q-item-section
@ -220,7 +209,7 @@ import CscMailToFaxRenewNotifyEmailForm from 'components/pages/FaxSettings/CscMa
import _ from 'lodash'
import { showGlobalError } from 'src/helpers/ui'
import { mapWaitingActions, mapWaitingGetters } from 'vue-wait'
import { mapState } from 'vuex'
import { mapGetters, mapState } from 'vuex'
export default {
name: 'CscMailToFaxSettings',
@ -252,12 +241,24 @@ export default {
'mailToFaxSettings',
'mailToFaxSettingsInitialized'
]),
...mapGetters('user', [
'getSubscriber'
]),
...mapWaitingGetters({
loadingMail2FaxSettings: 'loading mail2faxSettings'
}),
dataLoaded () {
return this.mailToFaxSettingsInitialized && !this.loadingMail2FaxSettings
},
disableToggle () {
if (!this.isAdministrator) {
return true
}
return !this.dataLoaded
},
isAdministrator () {
return this.getSubscriber?.administrative || false
},
secretKeyFieldLabel () {
let label = this.$t('Secret Key (empty=disabled)')
label += ` (${this.$t('Last Modify Time')}: `

@ -297,7 +297,6 @@
"Logout": "Abmelden",
"Loop": "Wiederholen",
"MAC address": "MAC-Adresse",
"Mail To Fax feature is not active": "Mail-zu-Fax Funktion ist nicht aktiv",
"Mail to Fax": "Mail-zu-Fax",
"Manager Secretary": "Chef-Sekretär",
"Manager Secretary feature": "Funktion Chef-Sekretär",

@ -289,7 +289,6 @@
"Logout": "Logout",
"Loop": "Loop",
"MAC address": "MAC address",
"Mail To Fax feature is not active": "Mail To Fax feature is not active",
"Mail to Fax": "Mail to Fax",
"Manager Secretary": "Manager Secretary",
"Manager Secretary feature": "Manager Secretary feature",

@ -298,7 +298,6 @@
"Logout": "Cerrar sesión",
"Loop": "Bucle",
"MAC address": "Dirección MAC",
"Mail To Fax feature is not active": "La función Correo a Fax no está activada",
"Mail to Fax": "Correo a Fax",
"Manager Secretary": "Gerente-Asistente",
"Manager Secretary feature": "Característica de Gerente-Asistente",

@ -297,7 +297,6 @@
"Logout": "Déconnexion",
"Loop": "Boucle",
"MAC address": "Adresse MAC",
"Mail To Fax feature is not active": "La fonction Mail To Fax n'est pas active",
"Mail to Fax": "Envoyer par fax",
"Manager Secretary": "Secrétaire de direction",
"Manager Secretary feature": "Fonctionnalité secrétaire du gestionnaire",

@ -293,7 +293,6 @@
"Logout": "Esci",
"Loop": "Ciclo",
"MAC address": "Indirizzo MAC",
"Mail To Fax feature is not active": "La funzione Mail To Fax non è attiva",
"Mail to Fax": "Mail to Fax",
"Manager Secretary": "Segreteria",
"Manager Secretary feature": "Funzione Segreteria",

Loading…
Cancel
Save