🪪 fix: Resolve Group-Scoped Config Overrides (#13176)
Some checks are pending
Docker Dev Branch Images Build / build (Dockerfile, lc-dev, node) (push) Waiting to run
Docker Dev Branch Images Build / build (Dockerfile.multi, lc-dev-api, api-build) (push) Waiting to run
GitNexus Index / index (push) Waiting to run
GitNexus Index / post-index (push) Blocked by required conditions

* fix: resolve group-scoped config overrides

* test: fix endpoint config request mock typing

* fix: keep remote agent preauth config tenant-scoped

* test: align config scoping expectations

* test: reproduce group endpoint override resolution
This commit is contained in:
Danny Avila 2026-05-18 10:16:20 -04:00 committed by GitHub
parent ac163c2212
commit c342e2345b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
19 changed files with 311 additions and 40 deletions

View file

@ -6,7 +6,13 @@ const { getAppConfig } = require('~/server/services/Config');
const getAvailablePluginsController = async (req, res) => {
try {
const appConfig = await getAppConfig({ role: req.user?.role, tenantId: req.user?.tenantId });
const appConfig =
req.config ??
(await getAppConfig({
role: req.user?.role,
userId: req.user?.id,
tenantId: req.user?.tenantId,
}));
const { filteredTools = [], includedTools = [] } = appConfig;
const uniquePlugins = filterUniquePlugins(availableTools);
@ -41,7 +47,12 @@ const getAvailableTools = async (req, res) => {
}
const appConfig =
req.config ?? (await getAppConfig({ role: req.user?.role, tenantId: req.user?.tenantId }));
req.config ??
(await getAppConfig({
role: req.user?.role,
userId: req.user?.id,
tenantId: req.user?.tenantId,
}));
let toolDefinitions = await getCachedTools();