summaryrefslogtreecommitdiffstats
path: root/routers/web/web.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2022-06-30 23:55:08 +0800
committerGitHub <noreply@github.com>2022-06-30 23:55:08 +0800
commit184a7d4195baffb169f24f4e9a4524f8d4045e91 (patch)
treeb7d620626be91e789115d41d9829518e4119c4a1 /routers/web/web.go
parentdb3355cb1aa206fc9f1cf786543607204f628218 (diff)
downloadgitea-184a7d4195baffb169f24f4e9a4524f8d4045e91.tar.gz
gitea-184a7d4195baffb169f24f4e9a4524f8d4045e91.zip
Check if project has the same repository id with issue when assign project to issue (#20133)
* Check if project has the same repository id with issue when assign project to issue * Check if issue's repository id match project's repository id * Add more permission checking * Remove invalid argument * Fix errors * Add generic check * Remove duplicated check * Return error + add check for new issues * Apply suggestions from code review Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: Gusted <williamzijl7@hotmail.com> Co-authored-by: KN4CK3R <admin@oldschoolhack.me> Co-authored-by: 6543 <6543@obermui.de>
Diffstat (limited to 'routers/web/web.go')
-rw-r--r--routers/web/web.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/web/web.go b/routers/web/web.go
index 80469ef7cd..1b6dd03bc8 100644
--- a/routers/web/web.go
+++ b/routers/web/web.go
@@ -901,7 +901,7 @@ func RegisterRoutes(m *web.Route) {
m.Post("/labels", reqRepoIssuesOrPullsWriter, repo.UpdateIssueLabel)
m.Post("/milestone", reqRepoIssuesOrPullsWriter, repo.UpdateIssueMilestone)
- m.Post("/projects", reqRepoIssuesOrPullsWriter, repo.UpdateIssueProject)
+ m.Post("/projects", reqRepoIssuesOrPullsWriter, reqRepoProjectsReader, repo.UpdateIssueProject)
m.Post("/assignee", reqRepoIssuesOrPullsWriter, repo.UpdateIssueAssignee)
m.Post("/request_review", reqRepoIssuesOrPullsReader, repo.UpdatePullReviewRequest)
m.Post("/dismiss_review", reqRepoAdmin, bindIgnErr(forms.DismissReviewForm{}), repo.DismissReview)