mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-01 17:38:33 +00:00
Allow access to the Public Organization Member lists with minimal permissions (#20330)
Examining Organization membership should not necessarily require sign-in if the organization is public and the members are public. Therefore we should adjust `/org/{org}/members` to not require login. Fix #7501 Signed-off-by: a1012112796 <1012112796@qq.com> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
7d20c8323a
commit
4f267ef643
4 changed files with 24 additions and 11 deletions
|
@ -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)
|
||||
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue