assertAllowedServer method

void assertAllowedServer(
  1. String serverId
)

FR-TENANT-003

Implementation

void assertAllowedServer(String serverId) {
  final ctx = _current;
  if (ctx == null) return;
  if (!ctx.allowedServerIds.contains(serverId)) {
    throw TenantAccessDeniedException(
      resource: 'server:$serverId',
      reason: 'Not in tenant allowlist',
    );
  }
}