fix(auth,ui): support least-privilege DB role, fix 1280px navbar, sync 13 MCP tools & standalone Woo/Shopify guide

This commit is contained in:
Amirul Islam Redwan71
2026-11-23 15:59:54 +06:00
parent df1c419539
commit 5e25a6277c
5 changed files with 145 additions and 22 deletions
+9 -1
View File
@@ -135,6 +135,14 @@ export async function initDynamicAuthStore(pool: any): Promise<void> {
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
)
`);
} catch (ddlErr: any) {
// Least-privilege runtime DB roles (e.g. aura_courier_runtime) intentionally lack schema CREATE;
// the table is pre-provisioned, so continue cleanly to load rows below.
if (!/permission denied/i.test(String(ddlErr?.message || ""))) {
console.warn("[Auth] Dynamic key table DDL skipped:", ddlErr?.message);
}
}
try {
const res = await pool.query("SELECT token_hash, tenant_id, store_name, scopes, is_admin, status, updated_at FROM aura_mcp_dynamic_keys");
for (const row of res.rows || []) {
dynamicKeyHashes.set(row.token_hash, {
@@ -149,7 +157,7 @@ export async function initDynamicAuthStore(pool: any): Promise<void> {
}
console.log(`[Auth] Loaded ${dynamicKeyHashes.size} dynamic MCP key(s) from PostgreSQL.`);
} catch (err: any) {
console.warn("[Auth] Dynamic key table init skipped:", err?.message);
console.warn("[Auth] Dynamic key table load skipped:", err?.message);
}
}