mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-16 19:00:38 +09:00
feat(plugin): scope secret-ref config by company
This commit is contained in:
parent
70b1a9109d
commit
4272b31136
19 changed files with 587 additions and 102 deletions
|
|
@ -489,7 +489,7 @@ export function buildHostServices(
|
|||
const registry = pluginRegistryService(db);
|
||||
const stateStore = pluginStateStore(db);
|
||||
const pluginDb = pluginDatabaseService(db);
|
||||
const secretsHandler = createPluginSecretsHandler({ db, pluginId });
|
||||
const secretsHandler = createPluginSecretsHandler({ db, pluginId, manifest: options.manifest });
|
||||
const companies = companyService(db);
|
||||
const agents = agentService(db);
|
||||
const managedAgents = pluginManagedAgentService(db, {
|
||||
|
|
@ -1053,8 +1053,8 @@ export function buildHostServices(
|
|||
|
||||
return {
|
||||
config: {
|
||||
async get() {
|
||||
const configRow = await registry.getConfig(pluginId);
|
||||
async get(params) {
|
||||
const configRow = await registry.getConfig(pluginId, params?.companyId ?? null);
|
||||
return configRow?.configJson ?? {};
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue