mirror of
https://github.com/dani-garcia/vaultwarden.git
synced 2025-06-25 04:22:49 +00:00
Allow removing users two factors
This commit is contained in:
parent
d23d4f2c1d
commit
026f9da035
3 changed files with 27 additions and 6 deletions
|
@ -26,9 +26,13 @@
|
|||
{{/each}}
|
||||
</span>
|
||||
</div>
|
||||
<div style="flex: 0 0 240px;">
|
||||
<a class="mr-3" href="#" onclick='deauthUser({{jsesc Id}})'>Deauthorize sessions</a>
|
||||
<a class="mr-3" href="#" onclick='deleteUser({{jsesc Id}}, {{jsesc Email}})'>Delete User</a>
|
||||
<div style="flex: 0 0 300px; font-size: 90%; text-align: right; padding-right: 15px">
|
||||
{{#if TwoFactorEnabled}}
|
||||
<a class="mr-2" href="#" onclick='remove2fa({{jsesc Id}})'>Remove all 2FA</a>
|
||||
{{/if}}
|
||||
|
||||
<a class="mr-2" href="#" onclick='deauthUser({{jsesc Id}})'>Deauthorize sessions</a>
|
||||
<a class="mr-2" href="#" onclick='deleteUser({{jsesc Id}}, {{jsesc Email}})'>Delete User</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -227,6 +231,12 @@
|
|||
}
|
||||
return false;
|
||||
}
|
||||
function remove2fa(id) {
|
||||
_post("/admin/users/" + id + "/remove-2fa",
|
||||
"2FA removed correctly",
|
||||
"Error removing 2FA");
|
||||
return false;
|
||||
}
|
||||
function deauthUser(id) {
|
||||
_post("/admin/users/" + id + "/deauth",
|
||||
"Sessions deauthorized correctly",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue