mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Merge branch 'master' of https://github.com/gogits/gogs
This commit is contained in:
commit
0b22d90b7c
6 changed files with 50 additions and 28 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue