Filter users when password reset is required
This commit is contained in:
parent
679c4433d1
commit
aa9ea40961
2 changed files with 8 additions and 2 deletions
|
@ -210,7 +210,11 @@ const users = {
|
|||
dispatch('SuccessMessage')
|
||||
},
|
||||
async RequirePasswordReset({ dispatch, getters }, user) {
|
||||
await requirePasswordReset(user.nickname, getters.authHost, getters.token)
|
||||
try {
|
||||
await requirePasswordReset(user.nickname, getters.authHost, getters.token)
|
||||
} catch (_e) {
|
||||
return
|
||||
}
|
||||
dispatch('SuccessMessage')
|
||||
},
|
||||
async SearchUsers({ commit, dispatch, state, getters }, { query, page }) {
|
||||
|
|
|
@ -206,7 +206,9 @@ export default {
|
|||
applyAction(filtered, removeTagFn)
|
||||
},
|
||||
requirePasswordReset: () => {
|
||||
this.selectedUsers.map(user => this.$store.dispatch('RequirePasswordReset', user))
|
||||
const filtered = this.selectedUsers.filter(user => user.local)
|
||||
filtered.map(user => this.$store.dispatch('RequirePasswordReset', user))
|
||||
this.$emit('apply-action')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue