forgejo-federation/services
zeripath 0724ca451e
Prevent 500 is head repo does not have PullRequest unit in IsUserAllowedToUpdate (#20839)
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>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Lauris BH <lauris@nix.lv>
2022-08-18 13:31:15 +03:00
..
agit Add more linters to improve code readability (#19989) 2022-06-20 12:02:49 +02:00
asymkey Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
attachment Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
auth auth/reverseproxy: Add support for full name (#20776) 2022-08-16 14:30:27 +08:00
automerge Add more linters to improve code readability (#19989) 2022-06-20 12:02:49 +02:00
comments Move issues related files into models/issues (#19931) 2022-06-13 17:37:59 +08:00
context Move almost all functions' parameter db.Engine to context.Context (#19748) 2022-05-20 22:08:52 +08:00
cron Make better use of i18n (#20096) 2022-06-26 22:19:22 +08:00
externalaccount Refactor auth package (#17962) 2022-01-02 21:12:35 +08:00
forms refactor webhook *NewPost (#20729) 2022-08-11 17:48:23 +02:00
gitdiff Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
issue Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
lfs Move some code into models/git (#19879) 2022-06-12 23:51:54 +08:00
mailer Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
migrations Add proxy host into allow list (#20798) 2022-08-16 20:15:54 -04:00
mirror Add new API endpoints for push mirrors management (#19841) 2022-07-30 18:45:59 +02:00
org Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
packages Use correct context to get package content (#20673) 2022-08-04 16:14:47 -05:00
pull Prevent 500 is head repo does not have PullRequest unit in IsUserAllowedToUpdate (#20839) 2022-08-18 13:31:15 +03:00
release Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
repository Add migrate repo archiver and packages storage support on command line (#20757) 2022-08-16 12:05:15 +08:00
task Add more linters to improve code readability (#19989) 2022-06-20 12:02:49 +02:00
user Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
webhook Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00
wiki Refactor AssertExistsAndLoadBean to use generics (#20797) 2022-08-16 10:22:25 +08:00