0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-17 23:41:49 +01:00

Show 2FA info on Admin Pannel: Users List (#12515)

This commit is contained in:
6543 2020-08-20 03:53:49 +02:00 committed by GitHub
parent a5440fcb1e
commit dcb543ac2a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 1 deletions

View file

@ -1982,6 +1982,7 @@ users.full_name = Full Name
users.activated = Activated users.activated = Activated
users.admin = Admin users.admin = Admin
users.restricted = Restricted users.restricted = Restricted
users.2fa = 2FA
users.repos = Repos users.repos = Repos
users.created = Created users.created = Created
users.last_login = Last Sign-In users.last_login = Last Sign-In

View file

@ -233,6 +233,7 @@ func RenderUserSearch(ctx *context.Context, opts *models.SearchUserOptions, tplN
ctx.Data["Keyword"] = opts.Keyword ctx.Data["Keyword"] = opts.Keyword
ctx.Data["Total"] = count ctx.Data["Total"] = count
ctx.Data["Users"] = users ctx.Data["Users"] = users
ctx.Data["UsersTwoFaStatus"] = models.UserList(users).GetTwoFaStatus()
ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled

View file

@ -25,6 +25,7 @@
<th>{{.i18n.Tr "admin.users.activated"}}</th> <th>{{.i18n.Tr "admin.users.activated"}}</th>
<th>{{.i18n.Tr "admin.users.admin"}}</th> <th>{{.i18n.Tr "admin.users.admin"}}</th>
<th>{{.i18n.Tr "admin.users.restricted"}}</th> <th>{{.i18n.Tr "admin.users.restricted"}}</th>
<th>{{.i18n.Tr "admin.users.2fa"}}</th>
<th>{{.i18n.Tr "admin.users.repos"}}</th> <th>{{.i18n.Tr "admin.users.repos"}}</th>
<th>{{.i18n.Tr "admin.users.created"}}</th> <th>{{.i18n.Tr "admin.users.created"}}</th>
<th data-sortt-asc="recentupdate" data-sortt-desc="leastupdate"> <th data-sortt-asc="recentupdate" data-sortt-desc="leastupdate">
@ -43,6 +44,7 @@
<td><i class="fa fa{{if .IsActive}}-check{{end}}-square-o"></i></td> <td><i class="fa fa{{if .IsActive}}-check{{end}}-square-o"></i></td>
<td><i class="fa fa{{if .IsAdmin}}-check{{end}}-square-o"></i></td> <td><i class="fa fa{{if .IsAdmin}}-check{{end}}-square-o"></i></td>
<td><i class="fa fa{{if .IsRestricted}}-check{{end}}-square-o"></i></td> <td><i class="fa fa{{if .IsRestricted}}-check{{end}}-square-o"></i></td>
<td><i class="fa fa{{if index $.UsersTwoFaStatus .ID}}-check{{end}}-square-o"></i></td>
<td>{{.NumRepos}}</td> <td>{{.NumRepos}}</td>
<td><span title="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</span></td> <td><span title="{{.CreatedUnix.FormatLong}}">{{.CreatedUnix.FormatShort}}</span></td>
{{if .LastLoginUnix}} {{if .LastLoginUnix}}

View file

@ -39,7 +39,7 @@
</div> </div>
<div class="ui one wide column center"> <div class="ui one wide column center">
<div class="meta"> <div class="meta">
2FA {{$.i18n.Tr "admin.users.2fa"}}
</div> </div>
<div class="meta"> <div class="meta">
<strong> <strong>