mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	add Owner to Context.Repo
This commit is contained in:
		@@ -34,6 +34,7 @@ type Context struct {
 | 
			
		||||
		IsValid    bool
 | 
			
		||||
		IsOwner    bool
 | 
			
		||||
		Repository *models.Repository
 | 
			
		||||
		Owner      *models.User
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -51,6 +51,8 @@ func RepoAssignment(redirect bool) martini.Handler {
 | 
			
		||||
			return
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		ctx.Repo.Owner = user
 | 
			
		||||
 | 
			
		||||
		// get repository
 | 
			
		||||
		repo, err := models.GetRepositoryByName(user, params["reponame"])
 | 
			
		||||
		if err != nil {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user