优化结构
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user