feat: disable password settings for users authenticated with third party auth (#921)
Co-authored-by: kolaente <k@knt.li> Reviewed-on: https://kolaente.dev/vikunja/frontend/pulls/921 Reviewed-by: dpschen <dpschen@noreply.kolaente.de> Co-authored-by: konrad <k@knt.li> Co-committed-by: konrad <k@knt.li>
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<card :title="$t('user.settings.updateEmailTitle')">
|
||||
<card v-if="isLocalUser" :title="$t('user.settings.updateEmailTitle')">
|
||||
<form @submit.prevent="updateEmail">
|
||||
<div class="field">
|
||||
<label class="label" for="newEmail">{{ $t('user.settings.updateEmailNew') }}</label>
|
||||
@ -51,6 +51,11 @@ export default {
|
||||
mounted() {
|
||||
this.setTitle(`${this.$t('user.settings.updateEmailTitle')} - ${this.$t('user.settings.title')}`)
|
||||
},
|
||||
computed: {
|
||||
isLocalUser() {
|
||||
return this.$store.state.auth.info?.isLocalUser
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async updateEmail() {
|
||||
await this.emailUpdateService.update(this.emailUpdate)
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<card :title="$t('user.settings.newPasswordTitle')" :loading="passwordUpdateService.loading">
|
||||
<card v-if="isLocalUser" :title="$t('user.settings.newPasswordTitle')" :loading="passwordUpdateService.loading">
|
||||
<form @submit.prevent="updatePassword">
|
||||
<div class="field">
|
||||
<label class="label" for="newPassword">{{ $t('user.settings.newPassword') }}</label>
|
||||
@ -67,6 +67,11 @@ export default {
|
||||
mounted() {
|
||||
this.setTitle(`${this.$t('user.settings.newPasswordTitle')} - ${this.$t('user.settings.title')}`)
|
||||
},
|
||||
computed: {
|
||||
isLocalUser() {
|
||||
return this.$store.state.auth.info?.isLocalUser
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
async updatePassword() {
|
||||
if (this.passwordConfirm !== this.passwordUpdate.newPassword) {
|
||||
|
Reference in New Issue
Block a user