fix(repo): preserve transfer recipient collaboration (#39042)

Remove temporary recipient access after a transfer ends while preserving
existing collaboration.

---------

Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
bircni
2026-08-22 21:43:42 +02:00
committed by GitHub
parent 9251eeb66b
commit e6af4c341c
7 changed files with 138 additions and 27 deletions
+23
View File
@@ -0,0 +1,23 @@
// Copyright 2026 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package v28
import (
"context"
"gitea.dev/modelmigration/base"
"xorm.io/xorm"
)
func AddRecipientAccessGrantedToRepoTransfer(_ context.Context, x base.EngineMigration) error {
type RepoTransfer struct {
RecipientAccessGranted bool `xorm:"NOT NULL DEFAULT false"`
}
_, err := x.SyncWithOptions(xorm.SyncOptions{
IgnoreConstrains: true,
IgnoreDropIndices: true,
}, new(RepoTransfer))
return err
}