mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-01 05:36:19 +01:00
Fix public org members displayed too many informations (#20403)
This commit is contained in:
parent
4c7e51ee3a
commit
d6779c7ad3
2 changed files with 23 additions and 20 deletions
|
@ -45,6 +45,7 @@ func Members(ctx *context.Context) {
|
|||
}
|
||||
opts.PublicOnly = !isMember && !ctx.Doer.IsAdmin
|
||||
}
|
||||
ctx.Data["PublicOnly"] = opts.PublicOnly
|
||||
|
||||
total, err := organization.CountOrgMembers(opts)
|
||||
if err != nil {
|
||||
|
|
|
@ -29,28 +29,30 @@
|
|||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui three wide column center">
|
||||
<div class="meta">
|
||||
{{$.locale.Tr "org.members.member_role"}}
|
||||
{{if not .PublicOnly}}
|
||||
<div class="ui three wide column center">
|
||||
<div class="meta">
|
||||
{{$.locale.Tr "org.members.member_role"}}
|
||||
</div>
|
||||
<div class="meta">
|
||||
<strong>{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div class="meta">
|
||||
<strong>{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}}</strong>
|
||||
<div class="ui two wide column center">
|
||||
<div class="meta">
|
||||
{{$.locale.Tr "admin.users.2fa"}}
|
||||
</div>
|
||||
<div class="meta">
|
||||
<strong>
|
||||
{{if index $.MembersTwoFaStatus .ID}}
|
||||
<span class="text green">{{svg "octicon-check"}}</span>
|
||||
{{else}}
|
||||
{{svg "octicon-x"}}
|
||||
{{end}}
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui two wide column center">
|
||||
<div class="meta">
|
||||
{{$.locale.Tr "admin.users.2fa"}}
|
||||
</div>
|
||||
<div class="meta">
|
||||
<strong>
|
||||
{{if index $.MembersTwoFaStatus .ID}}
|
||||
<span class="text green">{{svg "octicon-check"}}</span>
|
||||
{{else}}
|
||||
{{svg "octicon-x"}}
|
||||
{{end}}
|
||||
</strong>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
<div class="ui three wide column">
|
||||
<div class="text right">
|
||||
{{if eq $.SignedUser.ID .ID}}
|
||||
|
|
Loading…
Reference in a new issue