feat: 新增租户 active 状态与统一禁用闸门
This commit is contained in:
1 parent
634f0e2b78
commit
0ff3d9a313
21 files changed
+855
-14
No files matched your search
+5
-1
@@ -6,6 +6,7 @@ import type { CorpConfig } from "../core/config/types.js";
|
||||
import { VERSION_INFO } from "../version.js";
|
||||
import { isUpdateCacheExpired, loadUpdateCache, triggerBackgroundUpdateCheck } from "../core/update-cache.js";
|
||||
import { classifyCliError, usageError, validationError } from "../core/errors.js";
|
||||
import { isCorpDisabledError } from "../core/config/active.js";
|
||||
import {
|
||||
booleanOption,
|
||||
materialPackFilePolicyOptions,
|
||||
@@ -313,7 +314,10 @@ async function dispatch(argv: string[], runtime: CliRuntime) {
|
||||
let corp: CorpConfig;
|
||||
try {
|
||||
corp = (await import("./helpers.js")).selectCorp(stringOption(args.options.corp));
|
||||
} catch {
|
||||
} catch (error) {
|
||||
// Local lint tolerates a missing enterprise config, but a disabled tenant
|
||||
// is an explicit block: never degrade into the synthetic workspace corp.
|
||||
if (isCorpDisabledError(error)) throw error;
|
||||
corp = {
|
||||
id: "local",
|
||||
name: "Local Workspace",
|
||||
|
||||
Reference in new issue
Block a user