feat: show application ownership and scoped console management

This commit is contained in:
2026-09-27 12:12:46 +08:00
parent ed17713ea1
commit 1f2e7230dc
26 changed files with 757 additions and 47 deletions

View File

@@ -71,8 +71,11 @@ func (s *RetentionPolicyStore) GetRetentionPolicy(ctx context.Context, namespace
}
// retentionActor 在策略事务内验证控制台会话。普通 SDK 凭据不能修改保留策略。
// 管理员必须具备当前命名空间全部队列的管理范围;不添加角色体系或跨命名空间权限。
// 普通会话要求全部队列管理范围;部署指定管理员的显式范围在同一事务重新核验。
func retentionActor(ctx context.Context, tx *sql.Tx, token auth.Token) (core.ID, error) {
if token.Console != nil {
return consoleScopeActor(ctx, tx, token)
}
p, err := authenticate(ctx, tx, token)
if err != nil {
return "", err