fixed relationship issues

This commit is contained in:
2026-02-05 00:10:10 +11:00
parent 6a058ab636
commit 59ee880b63
22 changed files with 236 additions and 254 deletions

View File

@@ -46,8 +46,8 @@ func ensureUserHasAdminRole(ctx context.Context, tx bun.Tx, user *db.User) error
return errors.New("admin role not found in database")
}
// Grant admin role (nil grantedBy = system granted)
err = db.AssignRole(ctx, tx, user.ID, adminRole.ID, nil)
// Grant admin role
err = db.AssignRole(ctx, tx, user.ID, adminRole.ID)
if err != nil {
return errors.Wrap(err, "db.AssignRole")
}