@cubejs-backend/testing 1.6.39 → 1.6.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -186,6 +186,42 @@ module.exports = {
|
|
|
186
186
|
},
|
|
187
187
|
};
|
|
188
188
|
}
|
|
189
|
+
if (user === 'region_user') {
|
|
190
|
+
if (password && password !== 'region_user_password') {
|
|
191
|
+
throw new Error(`Password doesn't match for ${user}`);
|
|
192
|
+
}
|
|
193
|
+
return {
|
|
194
|
+
password,
|
|
195
|
+
superuser: false,
|
|
196
|
+
securityContext: {
|
|
197
|
+
auth: {
|
|
198
|
+
username: 'region_user',
|
|
199
|
+
userAttributes: {
|
|
200
|
+
allowedProductIds: [1, 2],
|
|
201
|
+
},
|
|
202
|
+
roles: [],
|
|
203
|
+
groups: ['user_group', 'region_group'],
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
if (user === 'region_user_no_filter') {
|
|
209
|
+
if (password && password !== 'region_user_no_filter_password') {
|
|
210
|
+
throw new Error(`Password doesn't match for ${user}`);
|
|
211
|
+
}
|
|
212
|
+
return {
|
|
213
|
+
password,
|
|
214
|
+
superuser: false,
|
|
215
|
+
securityContext: {
|
|
216
|
+
auth: {
|
|
217
|
+
username: 'region_user_no_filter',
|
|
218
|
+
userAttributes: {},
|
|
219
|
+
roles: [],
|
|
220
|
+
groups: ['user_group'],
|
|
221
|
+
},
|
|
222
|
+
},
|
|
223
|
+
};
|
|
224
|
+
}
|
|
189
225
|
if (user === 'sc_test') {
|
|
190
226
|
if (password && password !== 'sc_test_password') {
|
|
191
227
|
throw new Error(`Password doesn't match for ${user}`);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
cubes:
|
|
2
|
+
- name: region_test
|
|
3
|
+
sql_table: public.line_items
|
|
4
|
+
|
|
5
|
+
measures:
|
|
6
|
+
- name: count
|
|
7
|
+
type: count
|
|
8
|
+
|
|
9
|
+
dimensions:
|
|
10
|
+
- name: id
|
|
11
|
+
sql: id
|
|
12
|
+
type: number
|
|
13
|
+
primary_key: true
|
|
14
|
+
|
|
15
|
+
- name: product_id
|
|
16
|
+
sql: product_id
|
|
17
|
+
type: number
|
|
18
|
+
|
|
19
|
+
access_policy:
|
|
20
|
+
- role: "*"
|
|
21
|
+
member_level:
|
|
22
|
+
includes: "*"
|
|
23
|
+
row_level:
|
|
24
|
+
allow_all: true
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
views:
|
|
2
|
+
- name: region_test_view
|
|
3
|
+
cubes:
|
|
4
|
+
- join_path: region_test
|
|
5
|
+
includes: "*"
|
|
6
|
+
access_policy:
|
|
7
|
+
- group: user_group
|
|
8
|
+
conditions:
|
|
9
|
+
- if: "{ security_context.auth.groups and security_context.auth.groups.includes('region_group') }"
|
|
10
|
+
member_level:
|
|
11
|
+
includes: "*"
|
|
12
|
+
row_level:
|
|
13
|
+
filters:
|
|
14
|
+
- member: product_id
|
|
15
|
+
operator: equals
|
|
16
|
+
values: security_context.auth.userAttributes.allowedProductIds
|
|
17
|
+
|
|
18
|
+
- group: user_group
|
|
19
|
+
conditions:
|
|
20
|
+
- if: "{ not (security_context.auth.groups and security_context.auth.groups.includes('region_group')) }"
|
|
21
|
+
member_level:
|
|
22
|
+
includes: "*"
|
|
23
|
+
row_level:
|
|
24
|
+
allow_all: true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cubejs-backend/testing",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.40",
|
|
4
4
|
"description": "Cube.js e2e tests",
|
|
5
5
|
"author": "Cube Dev, Inc.",
|
|
6
6
|
"repository": {
|
|
@@ -100,15 +100,15 @@
|
|
|
100
100
|
"birdbox-fixtures"
|
|
101
101
|
],
|
|
102
102
|
"dependencies": {
|
|
103
|
-
"@cubejs-backend/cubestore-driver": "1.6.
|
|
103
|
+
"@cubejs-backend/cubestore-driver": "1.6.40",
|
|
104
104
|
"@cubejs-backend/dotenv": "^9.0.2",
|
|
105
|
-
"@cubejs-backend/ksql-driver": "1.6.
|
|
106
|
-
"@cubejs-backend/postgres-driver": "1.6.
|
|
107
|
-
"@cubejs-backend/query-orchestrator": "1.6.
|
|
108
|
-
"@cubejs-backend/schema-compiler": "1.6.
|
|
109
|
-
"@cubejs-backend/shared": "1.6.
|
|
110
|
-
"@cubejs-backend/testing-shared": "1.6.
|
|
111
|
-
"@cubejs-client/ws-transport": "1.6.
|
|
105
|
+
"@cubejs-backend/ksql-driver": "1.6.40",
|
|
106
|
+
"@cubejs-backend/postgres-driver": "1.6.40",
|
|
107
|
+
"@cubejs-backend/query-orchestrator": "1.6.40",
|
|
108
|
+
"@cubejs-backend/schema-compiler": "1.6.40",
|
|
109
|
+
"@cubejs-backend/shared": "1.6.40",
|
|
110
|
+
"@cubejs-backend/testing-shared": "1.6.40",
|
|
111
|
+
"@cubejs-client/ws-transport": "1.6.40",
|
|
112
112
|
"dedent": "^0.7.0",
|
|
113
113
|
"fs-extra": "^8.1.0",
|
|
114
114
|
"http-proxy": "^1.18.1",
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
},
|
|
120
120
|
"devDependencies": {
|
|
121
121
|
"@4tw/cypress-drag-drop": "^1.6.0",
|
|
122
|
-
"@cubejs-backend/linter": "1.6.
|
|
123
|
-
"@cubejs-client/core": "1.6.
|
|
122
|
+
"@cubejs-backend/linter": "1.6.40",
|
|
123
|
+
"@cubejs-client/core": "1.6.40",
|
|
124
124
|
"@jest/globals": "^29",
|
|
125
125
|
"@types/dedent": "^0.7.0",
|
|
126
126
|
"@types/http-proxy": "^1.17.5",
|
|
@@ -146,5 +146,5 @@
|
|
|
146
146
|
"eslintConfig": {
|
|
147
147
|
"extends": "../cubejs-linter"
|
|
148
148
|
},
|
|
149
|
-
"gitHead": "
|
|
149
|
+
"gitHead": "ca686109d640b6b9e8ba0f4dc484f6de266d5860"
|
|
150
150
|
}
|