

























@@ -65,6 +65,7 @@ describe("method scope resolution", () => {
6565["talk.session.submitToolResult", ["operator.write"]],
6666["talk.session.close", ["operator.write"]],
6767["update.status", ["operator.admin"]],
68+["config.schema", ["operator.admin"]],
6869["config.patch", ["operator.admin"]],
6970["nativeHook.invoke", ["operator.admin"]],
7071["wizard.start", ["operator.admin"]],
@@ -226,6 +227,7 @@ describe("operator scope authorization", () => {
226227["health", ["operator.read"], { allowed: true }],
227228["health", ["operator.write"], { allowed: true }],
228229["config.schema.lookup", ["operator.read"], { allowed: true }],
230+["config.schema", ["operator.read"], { allowed: false, missingScope: "operator.admin" }],
229231["config.patch", ["operator.admin"], { allowed: true }],
230232])("authorizes %s for scopes %j", (method, scopes, expected) => {
231233expect(authorizeOperatorScopesForMethod(method, scopes)).toEqual(expected);
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。