mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-24 16:34:58 +02:00
fix: migrate broken team authorize access mode (#39579)
* fix: #39571 * ref: https://github.com/go-gitea/gitea/pull/38938#pullrequestreview-4945228548 * fix the bug in `assignTeamPermissionUnits` which can result in wrong team access --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
1 parent
b71967b254
commit
b0d5a63e7a
7 files changed
+118
-2
No files matched your search
@@ -1,25 +0,0 @@
|
||||
// Copyright 2026 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
package v28
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"gitea.dev/modelmigration/base"
|
||||
|
||||
"xorm.io/xorm"
|
||||
)
|
||||
|
||||
// AddActionRunCommitSHAIndex indexes the runs lookup by commit, which the API `head_sha` filter uses.
|
||||
func AddActionRunCommitSHAIndex(_ context.Context, x base.EngineMigration) error {
|
||||
type ActionRun struct {
|
||||
CommitSHA string `xorm:"index"`
|
||||
}
|
||||
|
||||
_, err := x.SyncWithOptions(xorm.SyncOptions{
|
||||
IgnoreDropIndices: true,
|
||||
IgnoreConstrains: true,
|
||||
}, new(ActionRun))
|
||||
return err
|
||||
}
|
||||
Reference in new issue
Block a user