summaryrefslogtreecommitdiffstats
path: root/routers/repo/single.go
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-03-16 10:35:25 -0400
committerUnknown <joe2010xtmf@163.com>2014-03-16 10:35:25 -0400
commit425a58afd662297a1697349890f8611cf79d2019 (patch)
tree2fc3d2b4d63575baf6f56096fb1887b786dff0ea /routers/repo/single.go
parentf6e32b1b08a5eff2c0cbdfe827b40fdea9dc676e (diff)
downloadgitea-425a58afd662297a1697349890f8611cf79d2019.tar.gz
gitea-425a58afd662297a1697349890f8611cf79d2019.zip
Bug fix
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 eda30c00a6..6bf03ca2b8 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)
}