Skip to content

Commit 4e0b112

Browse files
committed
add userAttributes to CONTEXT_SYMBOLS
1 parent d2d7dbf commit 4e0b112

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/cubejs-schema-compiler/src/compiler/CubeSymbols.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,12 @@ export const CONTEXT_SYMBOLS = {
188188
securityContext: 'securityContext',
189189
FILTER_PARAMS: 'filterParams',
190190
FILTER_GROUP: 'filterGroup',
191-
SQL_UTILS: 'sqlUtils'
191+
SQL_UTILS: 'sqlUtils',
192+
// This is syntax sugar for `securityContext.cubeCloud.userAttributes`
193+
// while resolveSymbol won't return the exact path from securityContext
194+
// it's not a problem, because this is only needed for the transpilation phase
195+
// and then this shorthand will be transpiled with the full path
196+
userAttributes: 'securityContext.cubeCloud.userAttributes'
192197
};
193198

194199
export const CURRENT_CUBE_CONSTANTS = ['CUBE', 'TABLE'];

0 commit comments

Comments
 (0)