gitea/services/repository
Giteabot fd1edb9d9d
Fix DeleteCollaboration transaction behaviour (#28886) (#28889)
Backport #28886 by @KN4CK3R

The method can't be called with an outer transaction because if the user
is not a collaborator the outer transaction will be rolled back even if
the inner transaction uses the no-error path.

`has == 0` leads to `return nil` which cancels the transaction. A
standalone call of this method does nothing but if used with an outer
transaction, that will be canceled.

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2024-01-22 09:10:45 +01:00
..
archiver Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
files Fix reverting a merge commit failing (#28794) (#28825) 2024-01-21 14:18:37 +00:00
adopt_test.go
adopt.go Delete repos of org when purge delete user (#27273) (#27728) 2023-11-01 10:03:12 +08:00
avatar_test.go
avatar.go
branch.go Fix schedule tasks bugs (#28691) (#28780) 2024-01-14 23:54:22 +01:00
cache.go
check.go
collaboration_test.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
collaboration.go Fix DeleteCollaboration transaction behaviour (#28886) (#28889) 2024-01-22 09:10:45 +01:00
commit.go
create_test.go More refactoring of db.DefaultContext (#27083) 2023-09-15 06:13:19 +00:00
create.go
delete_test.go Delete repos of org when purge delete user (#27273) (#27728) 2023-11-01 10:03:12 +08:00
delete.go Delete repos of org when purge delete user (#27273) (#27728) 2023-11-01 10:03:12 +08:00
fork_test.go
fork.go Another round of db.DefaultContext refactor (#27103) (#27262) 2023-09-25 19:24:35 +02:00
hooks.go
lfs_test.go Delete repos of org when purge delete user (#27273) (#27728) 2023-11-01 10:03:12 +08:00
lfs.go
main_test.go
push.go Also sync DB branches on push if necessary (#28361) (#28403) 2023-12-11 06:16:56 +00:00
repository_test.go
repository.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00
review_test.go
review.go
setting.go Fix schedule tasks bugs (#28691) (#28780) 2024-01-14 23:54:22 +01:00
template.go
transfer_test.go
transfer.go Next round of db.DefaultContext refactor (#27089) 2023-09-16 14:39:12 +00:00