forked from gitea/gitea
add Owner to Context.Repo
This commit is contained in:
parent
7ca8306775
commit
f18c8fc4d9
|
@ -34,6 +34,7 @@ type Context struct {
|
||||||
IsValid bool
|
IsValid bool
|
||||||
IsOwner bool
|
IsOwner bool
|
||||||
Repository *models.Repository
|
Repository *models.Repository
|
||||||
|
Owner *models.User
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Reference in New Issue