Hide totp settings if it is disabled server side
This commit is contained in:
parent
bc603605a7
commit
c3ba068dd7
2 changed files with 8 additions and 1 deletions
|
@ -75,7 +75,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card" v-if="totpEnabled">
|
||||
<header class="card-header">
|
||||
<p class="card-header-title">
|
||||
Two Factor Authentication
|
||||
|
@ -132,6 +132,8 @@
|
|||
import TotpModel from '../../models/totp'
|
||||
import TotpService from '../../services/totp'
|
||||
|
||||
import {mapState} from 'vuex'
|
||||
|
||||
export default {
|
||||
name: 'Settings',
|
||||
data() {
|
||||
|
@ -177,6 +179,9 @@
|
|||
this.error(e, this)
|
||||
})
|
||||
},
|
||||
computed: mapState({
|
||||
totpEnabled: state => state.config.totpEnabled
|
||||
}),
|
||||
methods: {
|
||||
updatePassword() {
|
||||
if (this.passwordConfirm !== this.passwordUpdate.newPassword) {
|
||||
|
|
|
@ -13,6 +13,7 @@ export default {
|
|||
registrationEnabled: true,
|
||||
availableMigrators: [],
|
||||
taskAttachmentsEnabled: true,
|
||||
totpEnabled: true,
|
||||
}),
|
||||
mutations: {
|
||||
[CONFIG](state, config) {
|
||||
|
@ -24,6 +25,7 @@ export default {
|
|||
state.registrationEnabled = config.registration_enabled
|
||||
state.availableMigrators = config.available_migrators
|
||||
state.taskAttachmentsEnabled = config.task_attachments_enabled
|
||||
state.totpEnabled = config.totp_enabled
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
|
|
Loading…
Reference in a new issue