add Owner to Context.Repo

tokarchuk/v1.17
slene 11 years ago
parent 7ca8306775
commit f18c8fc4d9
  1. 1
      modules/middleware/context.go
  2. 2
      modules/middleware/repo.go

@ -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 {

Loading…
Cancel
Save