feat: allow for getting 2fa enabled users via /api/v1/admin/users (#12091)

Allow for filtering users with 2fa enabled as admin. So that it is easy to audit users' settings compliance with iso27001, etc.

Resolves #11800

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12091
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Dominik Zyla <zylad@noreply.codeberg.org>
Co-committed-by: Dominik Zyla <zylad@noreply.codeberg.org>
This commit is contained in:
Dominik Zyla
2026-04-16 19:52:56 +02:00
committed by Gusted
parent 39f677c0db
commit 6236a4cc99
3 changed files with 49 additions and 6 deletions
+6
View File
@@ -1509,6 +1509,12 @@
"name": "login_name",
"in": "query"
},
{
"type": "boolean",
"description": "whether or not to filter users with the 2fa enabled",
"name": "is_2fa_enabled",
"in": "query"
},
{
"enum": [
"oldest",