优化结构

This commit is contained in:
Yvan
2026-08-22 12:13:16 +08:00
parent d987244d0e
commit b27a66e9d3
200 changed files with 1794 additions and 1715 deletions
+2 -2
View File
@@ -2,9 +2,9 @@ package system
import (
"context"
"kra/internal/biz/system"
"testing"
"kra/internal/biz"
"kra/internal/conf"
)
@@ -108,7 +108,7 @@ func TestSetSelectedButtonsStrictRequiresManagedRoleAndOwnedButton(t *testing.T)
if err := db.Create(&authorityButtonPO{AuthorityID: actorID, MenuID: 10, ButtonID: 31}).Error; err != nil {
t.Fatal(err)
}
ctx := biz.NewActorContext(context.Background(), biz.Actor{AuthorityID: actorID})
ctx := system.NewActorContext(context.Background(), system.Actor{AuthorityID: actorID})
repo := &permissionRepo{data: data}
if err := repo.SetSelectedButtons(ctx, siblingID, 10, []uint{31}); err == nil {
t.Fatal("SetSelectedButtons() accepted an out-of-scope authority")