mirror of
1
Fork 0
forgejo/services/repository
Gusted 5488ec7d96
security: add permission check to 'delete branch after merge'
- Add a permission check that the doer has write permissions to the head
repository if the the 'delete branch after merge' is enabled when
merging a pull request.
- Unify the checks in the web and API router to `DeleteBranchAfterMerge`.
- Added integration tests.

(cherry picked from commit 266e0b2ce9)

Conflicts:
	tests/integration/pull_merge_test.go
  trivial context conflict
2024-10-28 06:32:10 +01:00
..
archiver enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
commitstatus Performance improvement for FindReposLastestCommitStatuses 2024-05-01 05:36:50 +00:00
files enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
adopt.go Fix incorrect default branch when adopt a repository (#30912) (#30928) 2024-05-14 16:09:33 +02:00
adopt_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
avatar.go Improve avatar uploading / resizing / compressing, remove Fomantic card module (#24653) 2023-05-13 20:59:11 +02:00
avatar_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
branch.go security: add permission check to 'delete branch after merge' 2024-10-28 06:32:10 +01:00
cache.go Always enable caches (#28527) 2023-12-19 09:29:05 +00:00
check.go Update tool dependencies (#29030) 2024-02-02 19:11:39 -05:00
collaboration.go Fix `DeleteCollaboration` transaction behaviour (#28886) 2024-01-22 07:19:56 +00:00
collaboration_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
commit.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
contributors_graph.go [BUG] Store JSON in contributors commit cache 2024-04-11 12:06:19 +00:00
contributors_graph_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
create.go Move get/set default branch from git package to gitrepo package to hide repopath (#29126) 2024-03-11 23:36:59 +07:00
create_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
delete.go mysql: use inner join for hook_task deletion 2024-05-24 12:46:33 +00:00
fork.go Allow admins to fork repos even when creation limits are exhausted (#3277) 2024-04-17 06:06:48 +00:00
fork_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
generate.go Move get/set default branch from git package to gitrepo package to hide repopath (#29126) 2024-03-11 23:36:59 +07:00
generate_test.go Move generate from module to service (#29465) 2024-03-06 12:10:44 +08:00
hooks.go Simplify how git repositories are opened (#28937) 2024-01-27 21:09:51 +01:00
init.go Move generate from module to service (#29465) 2024-03-06 12:10:44 +08:00
lfs.go Refactor LFS GC functions 2024-04-06 07:41:40 +00:00
lfs_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
migrate.go Move get/set default branch from git package to gitrepo package to hide repopath (#29126) 2024-03-11 23:36:59 +07:00
push.go Do not update PRs based on events that happened before they existed 2024-04-12 10:41:19 +02:00
repository.go Remove unnecessary parameter (#27671) 2023-10-18 15:03:10 +00:00
repository_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
review.go Use context parameter in services/repository (#23186) 2023-02-28 16:17:51 -06:00
review_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00
setting.go Fix an actions schedule bug (#28942) 2024-03-25 16:27:32 +01:00
template.go Move generate from module to service (#29465) 2024-03-06 12:10:44 +08:00
transfer.go [MODERATION] User blocking 2024-02-05 15:56:45 +01:00
transfer_test.go enable linter testifylint on v7 (#4572) 2024-07-30 19:42:06 +00:00