From dcb543ac2a9cccc16dd161c820a4a002e8a83e82 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Thu, 20 Aug 2020 03:53:49 +0200 Subject: [PATCH] Show 2FA info on Admin Pannel: Users List (#12515) --- options/locale/locale_en-US.ini | 1 + routers/home.go | 1 + templates/admin/user/list.tmpl | 2 ++ templates/org/member/members.tmpl | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 9727f7d0d..1cd94a468 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1982,6 +1982,7 @@ users.full_name = Full Name users.activated = Activated users.admin = Admin users.restricted = Restricted +users.2fa = 2FA users.repos = Repos users.created = Created users.last_login = Last Sign-In diff --git a/routers/home.go b/routers/home.go index ae94207ad..542567087 100644 --- a/routers/home.go +++ b/routers/home.go @@ -233,6 +233,7 @@ func RenderUserSearch(ctx *context.Context, opts *models.SearchUserOptions, tplN ctx.Data["Keyword"] = opts.Keyword ctx.Data["Total"] = count ctx.Data["Users"] = users + ctx.Data["UsersTwoFaStatus"] = models.UserList(users).GetTwoFaStatus() ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl index 3442d0419..d6dd7d5c0 100644 --- a/templates/admin/user/list.tmpl +++ b/templates/admin/user/list.tmpl @@ -25,6 +25,7 @@