Add ability to disable multi-factor authentication for a user

This commit is contained in:
Angelina Filippova 2020-07-02 00:15:41 +03:00
parent 92aef6b180
commit 0a3cbcb70d
3 changed files with 10 additions and 1 deletions

View file

@ -201,6 +201,7 @@ export default {
disableAnySubscription: 'Disallow following user at all',
disableAnySubscriptionForMultiple: 'Disallow following users at all',
requirePasswordReset: 'Require password reset on next login',
disableMfa: 'Disable multi-factor authentication',
selectUsers: 'Select users to apply actions to multiple users',
moderateUser: 'Moderate user',
moderateUsers: 'Moderate multiple users',

View file

@ -35,7 +35,7 @@
</header>
<moderation-dropdown
:user="user"
:page="'userPage'"
:page="'statusPage'"
@open-reset-token-dialog="openResetPasswordDialog"/>
</div>
<reset-password-dialog

View file

@ -98,6 +98,11 @@
@click.native="requirePasswordReset(user)">
{{ $t('users.requirePasswordReset') }}
</el-dropdown-item>
<el-dropdown-item
v-if="user.local"
@click.native="disableMfa(user.nickname)">
{{ $t('users.disableMfa') }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</template>
@ -127,6 +132,9 @@ export default {
}
},
methods: {
disableMfa(nickname) {
this.$store.dispatch('DisableMfa', nickname)
},
getPasswordResetToken(nickname) {
this.$emit('open-reset-token-dialog')
this.$store.dispatch('GetPasswordResetToken', nickname)