mirror of
https://github.com/formbricks/formbricks.git
synced 2026-05-09 11:10:36 -05:00
ffd4478184
Signed-off-by: gulshank0 <gulshanbahadur002@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Theodór Tómas <theodortomas@gmail.com> Co-authored-by: Anshuman Pandey <54475686+pandeymangg@users.noreply.github.com> Co-authored-by: Bhagya Amarasinghe <b.sithumini@yahoo.com> Co-authored-by: Chowdhury Tafsir Ahmed Siddiki <ctafsiras@gmail.com> Co-authored-by: neila <40727091+neila@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Tiago <1585571+xernobyl@users.noreply.github.com> Co-authored-by: Harsh Bhat <90265455+harshsbhat@users.noreply.github.com> Co-authored-by: Harsh Bhat <harshbhat@Harshs-MacBook-Air.local> Co-authored-by: Johannes <johannes@formbricks.com> Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com> Co-authored-by: Balázs Úr <balazs@urbalazs.hu> Co-authored-by: Johannes <72809645+jobenjada@users.noreply.github.com> Co-authored-by: Gulshan <gulshanbahadur002@gmail.com> Co-authored-by: Tiago Farto <tiago@formbricks.com> Co-authored-by: Harsh Bhat <harsh121102@gmail.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.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;
|
|
},
|
|
};
|