summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/middleware/context.go1
-rw-r--r--modules/middleware/repo.go2
2 files changed, 3 insertions, 0 deletions
diff --git a/modules/middleware/context.go b/modules/middleware/context.go
index 42ef1320cb..d002d3c24e 100644
--- a/modules/middleware/context.go
+++ b/modules/middleware/context.go
@@ -34,6 +34,7 @@ type Context struct {
IsValid bool
IsOwner bool
Repository *models.Repository
+ Owner *models.User
}
}
diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go
index fcf1f07b98..948713efe8 100644
--- a/modules/middleware/repo.go
+++ b/modules/middleware/repo.go
@@ -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 {