优化结构

This commit is contained in:
Yvan
2026-08-28 00:29:40 +08:00
parent 04ff85116c
commit 03a4131f6e
118 changed files with 758 additions and 834 deletions
-4
View File
@@ -80,10 +80,6 @@ func TestStrictUserUpdateRejectsPrimaryAuthorityOutsideManagedTree(t *testing.T)
if err := repo.UpdateUser(ctx, &system.User{ID: users[1].ID, NickName: "changed", AuthorityID: siblingID}); err == nil {
t.Fatal("UpdateUser() accepted a primary authority outside the managed tree")
}
if err := repo.UpdateUserWithAuthorities(ctx, &system.User{ID: users[1].ID, NickName: "changed", AuthorityID: siblingID}, []uint{childID}); err == nil {
t.Fatal("UpdateUserWithAuthorities() accepted a primary authority outside the managed tree")
}
var stored userPO
if err := data.gormDB.WithContext(context.Background()).First(&stored, users[1].ID).Error; err != nil {
t.Fatal(err)