search and ai stabilization work, localization stablized.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using StellaOps.Auth.Abstractions;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using static StellaOps.Localization.T;
|
||||
|
||||
namespace StellaOps.Configuration;
|
||||
|
||||
@@ -17,14 +18,14 @@ public sealed partial class AuthorityTenantRoleOptions
|
||||
{
|
||||
if (Scopes.Count == 0)
|
||||
{
|
||||
throw new InvalidOperationException($"Tenant '{tenantId}' role '{roleName}' must specify at least one scope.");
|
||||
throw new InvalidOperationException(_t("config.tenant.role_scope_required", tenantId, roleName));
|
||||
}
|
||||
|
||||
foreach (var scope in Scopes)
|
||||
{
|
||||
if (!StellaOpsScopes.IsKnown(scope))
|
||||
{
|
||||
throw new InvalidOperationException($"Tenant '{tenantId}' role '{roleName}' references unknown scope '{scope}'.");
|
||||
throw new InvalidOperationException(_t("config.tenant.role_unknown_scope", tenantId, roleName, scope));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +35,7 @@ public sealed partial class AuthorityTenantRoleOptions
|
||||
{
|
||||
if (!_allowedAttributeKeys.Contains(attributeName))
|
||||
{
|
||||
throw new InvalidOperationException($"Tenant '{tenantId}' role '{roleName}' defines unsupported attribute '{attributeName}'. Allowed attributes: env, owner, business_tier.");
|
||||
throw new InvalidOperationException(_t("config.tenant.role_unsupported_attribute", tenantId, roleName, attributeName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user