mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-11-04 00:11:04 +00:00 
			
		
		
		
	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)
		
			
				
	
	
		
			26 lines
		
	
	
	
		
			608 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
	
		
			608 B
		
	
	
	
		
			Go
		
	
	
	
	
	
// Copyright 2023 The Gitea Authors. All rights reserved.
 | 
						|
// SPDX-License-Identifier: MIT
 | 
						|
 | 
						|
package repo
 | 
						|
 | 
						|
import (
 | 
						|
	"net/http"
 | 
						|
 | 
						|
	"forgejo.org/modules/base"
 | 
						|
	"forgejo.org/services/context"
 | 
						|
)
 | 
						|
 | 
						|
const (
 | 
						|
	tplRecentCommits base.TplName = "repo/activity"
 | 
						|
)
 | 
						|
 | 
						|
// RecentCommits renders the page to show recent commit frequency on repository
 | 
						|
func RecentCommits(ctx *context.Context) {
 | 
						|
	ctx.Data["Title"] = ctx.Tr("repo.activity.navbar.recent_commits")
 | 
						|
 | 
						|
	ctx.Data["PageIsActivity"] = true
 | 
						|
	ctx.Data["PageIsRecentCommits"] = true
 | 
						|
	ctx.PageData["repoLink"] = ctx.Repo.RepoLink
 | 
						|
 | 
						|
	ctx.HTML(http.StatusOK, tplRecentCommits)
 | 
						|
}
 |