]> source.dussan.org Git - gitea.git/commit
Prevent 500 is head repo does not have PullRequest unit in IsUserAllowedToUpdate...
authorzeripath <art27@cantab.net>
Thu, 18 Aug 2022 18:55:34 +0000 (19:55 +0100)
committerGitHub <noreply@github.com>
Thu, 18 Aug 2022 18:55:34 +0000 (14:55 -0400)
commit15b61dac9855aaad803a1283b9555b9a278de964
treeccd76b92f6960c6a7d3ca48a27e421d1a45cacd2
parent35ca651c803a859900f9b7e76b02c0becdacf47e
Prevent 500 is head repo does not have PullRequest unit in IsUserAllowedToUpdate (#20839) (#20848)

Backport #20621

Some repositories do not have the PullRequest unit present in their configuration
and unfortunately the way that IsUserAllowedToUpdate currently works assumes
that this is an error instead of just returning false.

This PR simply swallows this error allowing the function to return false.

Fix #20621

Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
services/pull/update.go