File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
packages/cubejs-schema-compiler/test/unit Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -51,18 +51,18 @@ describe('Transpilers', () => {
5151 await compiler . compile ( ) ;
5252 } ) ;
5353
54- it ( 'CubePropContextTranspiler without userAttributes should work normally' , async ( ) => {
54+ it ( 'CubePropContextTranspiler with full path to userAttributes should work normally' , async ( ) => {
5555 const { joinGraph, cubeEvaluator, compiler } = prepareJsCompiler ( `
5656 cube(\`Test\`, {
5757 sql: 'SELECT * FROM users',
5858 dimensions: {
5959 userId: {
60- sql: \`CASE WHEN userId = '\${securityContext.userId}' THEN id ELSE 0 END\`,
60+ sql: \`CASE WHEN userId = '\${securityContext.cubeCloud.userAttributes. userId}' THEN id ELSE 0 END\`,
6161 type: 'string'
6262 }
6363 }
6464 })
65- ` ) ;
65+ ` , { compileContext : { securityContext : { cubeCloud : { userAttributes : { userId : 'user123' } } } } } ) ;
6666
6767 await compiler . compile ( ) ;
6868
@@ -92,7 +92,7 @@ describe('Transpilers', () => {
9292 }
9393 }
9494 })
95- ` ) ;
95+ ` , { compileContext : { securityContext : { cubeCloud : { userAttributes : { userId : 'user123' } } } } } ) ;
9696
9797 await compiler . compile ( ) ;
9898
You can’t perform that action at this time.
0 commit comments