mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Additional fixes after frontend packages upgrade
This commit is contained in:
@@ -34,7 +34,7 @@ export default {
|
||||
components: {
|
||||
ChoiceField
|
||||
},
|
||||
props: ['domain'],
|
||||
props: ['value'],
|
||||
data () {
|
||||
return {
|
||||
dkimKeyLengths: [
|
||||
@@ -59,8 +59,13 @@ export default {
|
||||
this.$emit('input', this.form)
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.form = { ...this.value }
|
||||
watch: {
|
||||
value: {
|
||||
handler: function (newValue) {
|
||||
this.form = { ...newValue }
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -62,8 +62,13 @@ export default {
|
||||
this.$emit('input', this.form)
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.form = { ...this.value }
|
||||
watch: {
|
||||
value: {
|
||||
handler: function (newValue) {
|
||||
this.form = { ...this.value }
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -75,8 +75,13 @@ export default {
|
||||
this.$emit('input', this.form)
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.form = { ...this.value }
|
||||
watch: {
|
||||
value: {
|
||||
handler: function (newValue) {
|
||||
this.form = { ...this.value }
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -234,7 +234,8 @@ export default {
|
||||
{
|
||||
text: this.$gettext('Profile'),
|
||||
icon: 'mdi-account-circle-outline',
|
||||
to: { name: 'UserProfile' }
|
||||
to: { name: 'UserProfile' },
|
||||
click: () => null
|
||||
},
|
||||
{
|
||||
text: this.$gettext('Logout'),
|
||||
|
||||
@@ -9,10 +9,16 @@
|
||||
<v-row>
|
||||
<v-col cols="6">
|
||||
<account-summary :account="account" />
|
||||
<domain-admin-domains
|
||||
v-if="account.role === 'DomainAdmins'"
|
||||
class="mt-2"
|
||||
:account="account"
|
||||
/>
|
||||
|
||||
</v-col>
|
||||
<v-col cols="6">
|
||||
<resources
|
||||
v-if="limitsConfig.params.enable_admin_limits && account.role !== 'SimpleUsers' && account.role !== 'SuperAdmins'"
|
||||
v-if="limitsConfig.params && limitsConfig.params.enable_admin_limits && account.role !== 'SimpleUsers' && account.role !== 'SuperAdmins'"
|
||||
:resources="account.resources"
|
||||
/>
|
||||
<account-aliases v-if="account.aliases" class="mt-2" :account="account" />
|
||||
@@ -23,11 +29,6 @@
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row v-if="account.role === 'DomainAdmins'">
|
||||
<v-col cols="6">
|
||||
<domain-admin-domains :account="account" />
|
||||
</v-col>
|
||||
</v-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ import logging
|
||||
from django.utils.html import escape
|
||||
from django.utils.translation import ugettext as _
|
||||
|
||||
from django.contrib.auth import login
|
||||
|
||||
from rest_framework import response, status
|
||||
from rest_framework_simplejwt import views as jwt_views
|
||||
from rest_framework_simplejwt.exceptions import InvalidToken, TokenError
|
||||
@@ -31,6 +33,7 @@ class TokenObtainPairView(jwt_views.TokenObtainPairView):
|
||||
raise InvalidToken(e.args[0])
|
||||
|
||||
user = serializer.user
|
||||
login(request, user)
|
||||
logger.info(
|
||||
_("User '%s' successfully logged in"), user.username
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user