diff options
author | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-03-26 20:02:15 +0800 |
---|---|---|
committer | FuXiaoHei <fuxiaohei@hexiaz.com> | 2014-03-26 20:02:15 +0800 |
commit | 0b22d90b7c936a7be4dd4c8e53b1af190aefe649 (patch) | |
tree | a699dd351bfa011211fe68ce387d6fe4ccf27044 /routers | |
parent | f5c9149dd52c0cf058a730fd9c912880638b02d8 (diff) | |
parent | 409e4cde7a379bbdbe53367b3726f64b80aed0eb (diff) | |
download | gitea-0b22d90b7c936a7be4dd4c8e53b1af190aefe649.tar.gz gitea-0b22d90b7c936a7be4dd4c8e53b1af190aefe649.zip |
Merge branch 'master' of https://github.com/gogits/gogs
Diffstat (limited to 'routers')
-rw-r--r-- | routers/repo/issue.go | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/routers/repo/issue.go b/routers/repo/issue.go index f7728273d0..a4dbad0f41 100644 --- a/routers/repo/issue.go +++ b/routers/repo/issue.go @@ -55,11 +55,6 @@ func Issues(ctx *middleware.Context, params martini.Params) { } func CreateIssue(ctx *middleware.Context, params martini.Params, form auth.CreateIssueForm) { - if !ctx.Repo.IsOwner { - ctx.Handle(404, "issue.CreateIssue", nil) - return - } - ctx.Data["Title"] = "Create issue" ctx.Data["IsRepoToolbarIssues"] = true ctx.Data["IsRepoToolbarIssuesList"] = false @@ -125,11 +120,6 @@ func ViewIssue(ctx *middleware.Context, params martini.Params) { } func UpdateIssue(ctx *middleware.Context, params martini.Params, form auth.CreateIssueForm) { - if !ctx.Repo.IsOwner { - ctx.Handle(404, "issue.UpdateIssue", nil) - return - } - index, err := base.StrTo(params["index"]).Int() if err != nil { ctx.Handle(404, "issue.UpdateIssue", err) @@ -146,6 +136,11 @@ func UpdateIssue(ctx *middleware.Context, params martini.Params, form auth.Creat return } + if ctx.User.Id != issue.PosterId { + ctx.Handle(404, "issue.UpdateIssue", nil) + return + } + issue.Name = form.IssueName issue.MilestoneId = form.MilestoneId issue.AssigneeId = form.AssigneeId |