Skip to content

Commit

Permalink
not request login for view public org members
Browse files Browse the repository at this point in the history
fix go-gitea#7501

Signed-off-by: a1012112796 <1012112796@qq.com>
  • Loading branch information
a1012112796 committed Jul 12, 2022
1 parent e24c238 commit cdff2f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
7 changes: 6 additions & 1 deletion routers/web/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,12 @@ func RegisterRoutes(m *web.Route) {
}

// ***** START: Organization *****
m.Group("/org", func() {
m.Group("/{org}", func() {
m.Get("/members", org.Members)
}, context.OrgAssignment())
}, ignSignIn)

m.Group("/org", func() {
m.Group("", func() {
m.Get("/create", org.Create)
Expand All @@ -625,7 +631,6 @@ func RegisterRoutes(m *web.Route) {
m.Get("/pulls/{team}", user.Pulls)
m.Get("/milestones", reqMilestonesDashboardPageEnabled, user.Milestones)
m.Get("/milestones/{team}", reqMilestonesDashboardPageEnabled, user.Milestones)
m.Get("/members", org.Members)
m.Post("/members/action/{action}", org.MembersAction)
m.Get("/teams", org.Teams)
}, context.OrgAssignment(true, false, true))
Expand Down
8 changes: 3 additions & 5 deletions templates/org/home.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,9 @@
{{end}}
<h4 class="ui top attached header df">
<strong class="f1">{{.locale.Tr "org.people"}}</strong>
{{if .IsOrganizationMember}}
<div class="ui">
<a class="text grey dif ac" href="{{.OrgLink}}/members"><span>{{.Org.NumMembers}}</span> {{svg "octicon-chevron-right"}}</a>
</div>
{{end}}
<div class="ui">
<a class="text grey dif ac" href="{{.OrgLink}}/members"><span>{{.MembersTotal}}</span> {{svg "octicon-chevron-right"}}</a>
</div>
</h4>
<div class="ui attached segment members">
{{$isMember := .IsOrganizationMember}}
Expand Down

0 comments on commit cdff2f0

Please sign in to comment.