mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-21 00:58:29 -06:00
- Add Cube container to docker-compose.dev.yml (pinned v1.3.21) - Add Cube server config (cube/cube.js) and FeedbackRecords schema - Add @cubejs-client/core dependency and singleton client in EE module - Add CUBEJS_API_URL and CUBEJS_API_TOKEN to .env.example Co-authored-by: Cursor <cursoragent@cursor.com>
13 lines
629 B
JavaScript
13 lines
629 B
JavaScript
module.exports = {
|
|
// queryRewrite runs before every Cube query. Use it to enforce row-level security (RLS)
|
|
// by injecting filters based on the caller's identity (e.g. organizationId, projectId).
|
|
//
|
|
// The securityContext is populated from the decoded JWT passed via the API token.
|
|
// Currently a passthrough because access control is handled in the Next.js API layer
|
|
// before reaching Cube. When Cube is exposed more broadly or multi-tenancy enforcement
|
|
// is needed at the Cube level, add filters here based on securityContext claims.
|
|
queryRewrite: (query, { securityContext }) => {
|
|
return query;
|
|
},
|
|
};
|