fix(auth,ui): support least-privilege DB role, fix 1280px navbar, sync 13 MCP tools & standalone Woo/Shopify guide
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user