forgejo/services/pull
Earl Warren 2df082393e
fix(hook): repo admins are wrongly denied the right to force merge
The right to force merge is uses the wrong predicate and
applies to instance admins:

  ctx.user.IsAdmin

It must apply to repository admins and use the following predicate:

 ctx.userPerm.IsAdmin()

This regression is from the ApplyToAdmins implementation in
79b7089360.

Fixes: https://codeberg.org/forgejo/forgejo/issues/3780
(cherry picked from commit 09f3518069)
2024-06-02 22:05:16 +02:00
..
check.go fix(hook): repo admins are wrongly denied the right to force merge 2024-06-02 22:05:16 +02:00
check_test.go
comment.go
commit_status.go Use db.ListOptionsAll instead of db.ListOptions{ListAll: true} (#29995) 2024-03-26 19:04:27 +01:00
commit_status_test.go Fixing the issue when status check per rule matches multiple actions (#29631) 2024-03-11 23:36:59 +07:00
edits.go
lfs.go
main_test.go
merge.go Move database operations of merging a pull request to post receive hook and add a transaction (#30805) 2024-05-14 15:37:32 +02:00
merge_ff_only.go Add merge style fast-forward-only (#28954) 2024-02-14 17:19:19 +01:00
merge_merge.go Add merge style fast-forward-only (#28954) 2024-02-14 17:19:19 +01:00
merge_prepare.go
merge_rebase.go
merge_squash.go
merge_test.go
patch.go
patch_unmerged.go
pull.go [TEST] make the indexer and pull tasks cancellable (without shutdown) 2024-04-16 10:37:59 +02:00
pull_test.go
review.go Prevent re-review and dismiss review actions on closed and merged PRs (#30065) 2024-03-30 07:17:32 +01:00
review_test.go Prevent re-review and dismiss review actions on closed and merged PRs (#30065) 2024-03-30 07:17:32 +01:00
temp_repo.go
update.go Move database operations of merging a pull request to post receive hook and add a transaction (#30805) 2024-05-14 15:37:32 +02:00
update_rebase.go