summaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-10-29 02:23:31 +0000
committerGitHub <noreply@github.com>2020-10-28 22:23:31 -0400
commit4b33afcd5bf08afa116512eaea92c73ade332bee (patch)
tree66010d7b7ebd4d38d6ad10d2fe481e42ad03d0e0 /routers
parentbeb6bf4261ace56f9c97c03f709b4fe29746b3d7 (diff)
downloadgitea-4b33afcd5bf08afa116512eaea92c73ade332bee.tar.gz
gitea-4b33afcd5bf08afa116512eaea92c73ade332bee.zip
Migration failure during reaction migration from gitea (#13344)
* Migrating reactions is just not that important A failure during migrating reactions should not cause failure of migration. Signed-off-by: Andrew Thornton <art27@cantab.net> * When checking issue reactions check the correct permission Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'routers')
-rw-r--r--routers/api/v1/repo/issue_reaction.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/api/v1/repo/issue_reaction.go b/routers/api/v1/repo/issue_reaction.go
index f5387fdd1a..5c983b0fc5 100644
--- a/routers/api/v1/repo/issue_reaction.go
+++ b/routers/api/v1/repo/issue_reaction.go
@@ -271,7 +271,7 @@ func GetIssueReactions(ctx *context.APIContext) {
return
}
- if !ctx.Repo.CanRead(models.UnitTypeIssues) {
+ if !ctx.Repo.CanReadIssuesOrPulls(issue.IsPull) {
ctx.Error(http.StatusForbidden, "GetIssueReactions", errors.New("no permission to get reactions"))
return
}