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>
|
||||||
</div>
|
</div>
|
||||||
<div class="card">
|
<div class="card" v-if="totpEnabled">
|
||||||
<header class="card-header">
|
<header class="card-header">
|
||||||
<p class="card-header-title">
|
<p class="card-header-title">
|
||||||
Two Factor Authentication
|
Two Factor Authentication
|
||||||
|
@ -132,6 +132,8 @@
|
||||||
import TotpModel from '../../models/totp'
|
import TotpModel from '../../models/totp'
|
||||||
import TotpService from '../../services/totp'
|
import TotpService from '../../services/totp'
|
||||||
|
|
||||||
|
import {mapState} from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Settings',
|
name: 'Settings',
|
||||||
data() {
|
data() {
|
||||||
|
@ -177,6 +179,9 @@
|
||||||
this.error(e, this)
|
this.error(e, this)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
computed: mapState({
|
||||||
|
totpEnabled: state => state.config.totpEnabled
|
||||||
|
}),
|
||||||
methods: {
|
methods: {
|
||||||
updatePassword() {
|
updatePassword() {
|
||||||
if (this.passwordConfirm !== this.passwordUpdate.newPassword) {
|
if (this.passwordConfirm !== this.passwordUpdate.newPassword) {
|
||||||
|
|
|
@ -13,6 +13,7 @@ export default {
|
||||||
registrationEnabled: true,
|
registrationEnabled: true,
|
||||||
availableMigrators: [],
|
availableMigrators: [],
|
||||||
taskAttachmentsEnabled: true,
|
taskAttachmentsEnabled: true,
|
||||||
|
totpEnabled: true,
|
||||||
}),
|
}),
|
||||||
mutations: {
|
mutations: {
|
||||||
[CONFIG](state, config) {
|
[CONFIG](state, config) {
|
||||||
|
@ -24,6 +25,7 @@ export default {
|
||||||
state.registrationEnabled = config.registration_enabled
|
state.registrationEnabled = config.registration_enabled
|
||||||
state.availableMigrators = config.available_migrators
|
state.availableMigrators = config.available_migrators
|
||||||
state.taskAttachmentsEnabled = config.task_attachments_enabled
|
state.taskAttachmentsEnabled = config.task_attachments_enabled
|
||||||
|
state.totpEnabled = config.totp_enabled
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
|
Loading…
Reference in a new issue