forgejo/services/pull
Earl Warren 09f3518069
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
2024-06-02 21:16:46 +02:00
..
check.go fix(hook): repo admins are wrongly denied the right to force merge 2024-06-02 21:16:46 +02:00
check_test.go
comment.go Add codespell support and fix a good number of typos with its help (#3270) 2024-05-09 13:49:37 +00:00
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-12 20:03:10 +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 Simplify how git repositories are opened (#28937) 2024-01-27 21:09:51 +01:00
merge_squash.go Simplify how git repositories are opened (#28937) 2024-01-27 21:09:51 +01:00
merge_test.go
patch.go Simplify how git repositories are opened (#28937) 2024-01-27 21:09:51 +01:00
patch_unmerged.go
pull.go Add codespell support and fix a good number of typos with its help (#3270) 2024-05-09 13:49:37 +00:00
pull_test.go Simplify how git repositories are opened (#28937) 2024-01-27 21:09:51 +01:00
review.go Resolve lint for unused parameter and unnecessary type arguments (#30750) 2024-05-05 08:38:16 +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-12 20:03:10 +02:00
update_rebase.go Resolve lint for unused parameter and unnecessary type arguments (#30750) 2024-05-05 08:38:16 +01:00