From 4b33afcd5bf08afa116512eaea92c73ade332bee Mon Sep 17 00:00:00 2001 From: zeripath Date: Thu, 29 Oct 2020 02:23:31 +0000 Subject: 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 * When checking issue reactions check the correct permission Signed-off-by: Andrew Thornton Co-authored-by: techknowlogick --- routers/api/v1/repo/issue_reaction.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'routers') 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 } -- cgit v1.2.3