aboutsummaryrefslogtreecommitdiff
path: root/routers/repo/single.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2014-03-16 23:03:27 +0800
committerLunny Xiao <xiaolunwen@gmail.com>2014-03-16 23:03:27 +0800
commit015174484a3aa430e30801e0c3c5ce0bdc4a5bf5 (patch)
tree998a2362f2d8ba7f22f1a0bb55bb70cf6f3988c0 /routers/repo/single.go
parent1fb457ac1f46ef07557f5c8c5b84438f2325a5cf (diff)
parent9249ceaff2802ab571f163a9a163b716e5ee26cc (diff)
Merge branch 'master' of github.com:gogits/gogs
Diffstat (limited to 'routers/repo/single.go')
-rw-r--r--routers/repo/single.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/routers/repo/single.go b/routers/repo/single.go
index eda30c00..6bf03ca2 100644
--- a/routers/repo/single.go
+++ b/routers/repo/single.go
@@ -46,11 +46,12 @@ func Single(ctx *middleware.Context, params martini.Params) {
ctx.Data["Paths"] = Paths
ctx.Data["Treenames"] = treenames
ctx.Data["IsRepoToolbarSource"] = true
+ ctx.Data["IsRepositoryOwner"] = strings.ToLower(params["username"]) == ctx.User.LowerName
ctx.Data["Files"] = files
ctx.Render.HTML(200, "repo/single", ctx.Data)
}
-func Setting(ctx *middleware.Context) {
+func Setting(ctx *middleware.Context, params martini.Params) {
if !ctx.Repo.IsValid {
return
}
@@ -62,6 +63,7 @@ func Setting(ctx *middleware.Context) {
ctx.Data["Title"] = title + " - settings"
ctx.Data["IsRepoToolbarSetting"] = true
+ ctx.Data["IsRepositoryOwner"] = strings.ToLower(params["username"]) == ctx.User.LowerName
ctx.Render.HTML(200, "repo/setting", ctx.Data)
}