mirror of
1
Fork 0

add Owner to Context.Repo

This commit is contained in:
slene 2014-03-16 00:14:26 +08:00
parent 7ca8306775
commit f18c8fc4d9
2 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,7 @@ type Context struct {
IsValid bool IsValid bool
IsOwner bool IsOwner bool
Repository *models.Repository Repository *models.Repository
Owner *models.User
} }
} }

View File

@ -51,6 +51,8 @@ func RepoAssignment(redirect bool) martini.Handler {
return return
} }
ctx.Repo.Owner = user
// get repository // get repository
repo, err := models.GetRepositoryByName(user, params["reponame"]) repo, err := models.GetRepositoryByName(user, params["reponame"])
if err != nil { if err != nil {