diff --git a/src/controllers/llmo/llmo.js b/src/controllers/llmo/llmo.js index d922107b8..86af882f9 100644 --- a/src/controllers/llmo/llmo.js +++ b/src/controllers/llmo/llmo.js @@ -394,6 +394,9 @@ function LlmoController(ctx) { const { siteId } = context.params; const version = context.data?.version; try { + // Validate site and LLMO access + await getSiteAndValidateLlmo(context); + if (!s3 || !s3.s3Client) { return badRequest('LLMO config storage is not configured for this environment'); } @@ -430,6 +433,9 @@ function LlmoController(ctx) { const userId = context.attributes?.authInfo?.getProfile()?.sub || 'system'; try { + // Validate site and LLMO access + await getSiteAndValidateLlmo(context); + if (!isObject(data)) { return badRequest('LLMO config update must be provided as an object'); }