fix(superset): RLS por tenantId no guest token + uuid no schema
- Aplica cláusula tenant_id no RLS do Superset para isolamento por tenant - Adiciona uuid ao import do drizzle-orm/pg-core no schema
This commit is contained in:
parent
e506023d53
commit
132a734832
|
|
@ -52,7 +52,7 @@ export function registerSupersetRoutes(app: Express): void {
|
||||||
last_name: user?.name?.split(" ").slice(1).join(" ") || "User",
|
last_name: user?.name?.split(" ").slice(1).join(" ") || "User",
|
||||||
},
|
},
|
||||||
resources: [{ type: "dashboard", id: dashboardId }],
|
resources: [{ type: "dashboard", id: dashboardId }],
|
||||||
rls: [],
|
rls: user?.tenantId ? [{ clause: `tenant_id = ${user.tenantId}`, type: "BASE_ROLE" }] : [],
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
import { sql } from "drizzle-orm";
|
import { sql } from "drizzle-orm";
|
||||||
import { pgTable, text, varchar, primaryKey, serial, integer, timestamp, numeric, jsonb, boolean, date } from "drizzle-orm/pg-core";
|
import { pgTable, text, varchar, primaryKey, serial, integer, timestamp, numeric, jsonb, boolean, date, uuid } from "drizzle-orm/pg-core";
|
||||||
import { createInsertSchema } from "drizzle-zod";
|
import { createInsertSchema } from "drizzle-zod";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue