mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-26 18:20:57 +00:00
Hide activity contributors, recent commits and code frequrency left tabs if there is no code permission (#34053)
When a team have no code unit permission of a repository, the member of the team should not view activity contributors, recent commits and code frequrency. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> (cherry picked from commit 49899070cd600e7b7bd31a750f4d49de1722db23)
This commit is contained in:
parent
adc2a215c1
commit
b296354873
4 changed files with 15 additions and 26 deletions
|
@ -1455,7 +1455,7 @@ func registerRoutes(m *web.Route) {
|
|||
}, repo.MustBeNotEmpty, context.RequireRepoReaderOr(unit.TypeCode))
|
||||
m.Group("/recent-commits", func() {
|
||||
m.Get("", repo.RecentCommits)
|
||||
m.Get("/data", repo.RecentCommitsData)
|
||||
m.Get("/data", repo.CodeFrequencyData)
|
||||
}, repo.MustBeNotEmpty, context.RequireRepoReaderOr(unit.TypeCode))
|
||||
}, context.RepoRef(), context.RequireRepoReaderOr(unit.TypeCode, unit.TypePullRequests, unit.TypeIssues, unit.TypeReleases))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue