feat: 新增租户 active 状态与统一禁用闸门

This commit is contained in:
gitea committed 2026-11-08 12:52:05 +08:00
1 parent 634f0e2b78
commit 0ff3d9a313
21 files changed
+855 -14

No files matched your search

+5 -1
View File
@@ -6,6 +6,7 @@ import { runCapabilityResult } from "../helpers.js";
import { booleanOption, numberOption, stringOption } from "../parser.js";
import { outputOptions, printJson } from "../printer.js";
import { CliError, usageError } from "../../core/errors.js";
import { isCorpDisabledError } from "../../core/config/active.js";
import {
BUILTIN_MONTHLY_TEMPLATE,
exportReportPackage,
@@ -36,7 +37,10 @@ export async function handleLocalReportCommand(action: string | undefined, args:
try {
const { selectCorp } = await import("../helpers.js");
corp = selectCorp(corpId);
} catch {
} catch (error) {
// Ledger/review work is tenant-free, but if the caller explicitly named a
// disabled enterprise, the block must still stand instead of falling back.
if (isCorpDisabledError(error)) throw error;
corp = {
corpId,
id: corpId,