feat: 新增租户 active 状态与统一禁用闸门
This commit is contained in:
1 parent
634f0e2b78
commit
0ff3d9a313
21 files changed
+855
-14
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user