mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-24 16:04:46 +00:00
e6af4c341c
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>
24 lines
505 B
Go
24 lines
505 B
Go
// 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
|
|
}
|