mirror of https://github.com/go-gitea/gitea.git
auth fix
This commit is contained in:
parent
3cc860a46f
commit
409e4cde7a
|
@ -117,11 +117,6 @@ func ViewIssue(ctx *middleware.Context, params martini.Params) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func UpdateIssue(ctx *middleware.Context, params martini.Params, form auth.CreateIssueForm) {
|
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()
|
index, err := base.StrTo(params["index"]).Int()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
ctx.Handle(404, "issue.UpdateIssue", err)
|
ctx.Handle(404, "issue.UpdateIssue", err)
|
||||||
|
@ -138,6 +133,11 @@ func UpdateIssue(ctx *middleware.Context, params martini.Params, form auth.Creat
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ctx.User.Id != issue.PosterId {
|
||||||
|
ctx.Handle(404, "issue.UpdateIssue", nil)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
issue.Name = form.IssueName
|
issue.Name = form.IssueName
|
||||||
issue.MilestoneId = form.MilestoneId
|
issue.MilestoneId = form.MilestoneId
|
||||||
issue.AssigneeId = form.AssigneeId
|
issue.AssigneeId = form.AssigneeId
|
||||||
|
|
Loading…
Reference in New Issue