Skip to content

Commit 0956e50

Browse files
committed
fix
1 parent 0196b35 commit 0956e50

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

routers/web/web.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,15 +1446,15 @@ func registerRoutes(m *web.Router) {
14461446
m.Group("/contributors", func() {
14471447
m.Get("", repo.Contributors)
14481448
m.Get("/data", repo.ContributorsData)
1449-
})
1449+
}, reqRepoCodeReader)
14501450
m.Group("/code-frequency", func() {
14511451
m.Get("", repo.CodeFrequency)
14521452
m.Get("/data", repo.CodeFrequencyData)
1453-
})
1453+
}, reqRepoCodeReader)
14541454
m.Group("/recent-commits", func() {
14551455
m.Get("", repo.RecentCommits)
14561456
m.Get("/data", repo.RecentCommitsData)
1457-
})
1457+
}, reqRepoCodeReader)
14581458
},
14591459
ignSignIn, context.RepoAssignment, context.RequireRepoReaderOr(unit.TypePullRequests, unit.TypeIssues, unit.TypeReleases),
14601460
context.RepoRef(), repo.MustBeNotEmpty,

templates/repo/navbar.tmpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<a class="{{if .PageIsPulse}}active {{end}}item" href="{{.RepoLink}}/activity">
33
{{ctx.Locale.Tr "repo.activity.navbar.pulse"}}
44
</a>
5+
{{if .Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
56
<a class="{{if .PageIsContributors}}active {{end}}item" href="{{.RepoLink}}/activity/contributors">
67
{{ctx.Locale.Tr "repo.activity.navbar.contributors"}}
78
</a>
@@ -11,4 +12,5 @@
1112
<a class="{{if .PageIsRecentCommits}}active{{end}} item" href="{{.RepoLink}}/activity/recent-commits">
1213
{{ctx.Locale.Tr "repo.activity.navbar.recent_commits"}}
1314
</a>
15+
{{end}}
1416
</div>

0 commit comments

Comments
 (0)