@@ -16,7 +16,7 @@ function makePermissions(overrides: Partial<IComplexPermission> = {}): IComplexP
1616}
1717
1818test ( 'isMain=true generates a single wildcard permit' , ( t ) => {
19- const result = generateCedarPolicyForGroup ( groupId , connectionId , true , makePermissions ( ) ) ;
19+ const result = generateCedarPolicyForGroup ( connectionId , true , makePermissions ( ) ) ;
2020 t . true ( result . includes ( 'principal,' ) ) ;
2121 t . true ( result . includes ( 'action,' ) ) ;
2222 t . true ( result . includes ( 'resource' ) ) ;
@@ -27,7 +27,6 @@ test('isMain=true generates a single wildcard permit', (t) => {
2727
2828test ( 'connection:edit generates ONLY connection:read + connection:edit (not wildcard)' , ( t ) => {
2929 const result = generateCedarPolicyForGroup (
30- groupId ,
3130 connectionId ,
3231 false ,
3332 makePermissions ( {
@@ -49,7 +48,6 @@ test('connection:edit generates ONLY connection:read + connection:edit (not wild
4948
5049test ( 'connection:readonly generates only connection:read' , ( t ) => {
5150 const result = generateCedarPolicyForGroup (
52- groupId ,
5351 connectionId ,
5452 false ,
5553 makePermissions ( {
@@ -63,14 +61,13 @@ test('connection:readonly generates only connection:read', (t) => {
6361} ) ;
6462
6563test ( 'connection:none generates no connection policies' , ( t ) => {
66- const result = generateCedarPolicyForGroup ( groupId , connectionId , false , makePermissions ( ) ) ;
64+ const result = generateCedarPolicyForGroup ( connectionId , false , makePermissions ( ) ) ;
6765 t . false ( result . includes ( 'connection:read' ) ) ;
6866 t . false ( result . includes ( 'connection:edit' ) ) ;
6967} ) ;
7068
7169test ( 'group:edit generates group:read + group:edit' , ( t ) => {
7270 const result = generateCedarPolicyForGroup (
73- groupId ,
7471 connectionId ,
7572 false ,
7673 makePermissions ( {
@@ -85,7 +82,6 @@ test('group:edit generates group:read + group:edit', (t) => {
8582
8683test ( 'group:readonly generates only group:read' , ( t ) => {
8784 const result = generateCedarPolicyForGroup (
88- groupId ,
8985 connectionId ,
9086 false ,
9187 makePermissions ( {
@@ -100,7 +96,6 @@ test('group:readonly generates only group:read', (t) => {
10096
10197test ( 'table with visibility=true only generates only table:read' , ( t ) => {
10298 const result = generateCedarPolicyForGroup (
103- groupId ,
10499 connectionId ,
105100 false ,
106101 makePermissions ( {
@@ -122,7 +117,6 @@ test('table with visibility=true only generates only table:read', (t) => {
122117
123118test ( 'table with all flags true generates table:read + table:add + table:edit + table:delete' , ( t ) => {
124119 const result = generateCedarPolicyForGroup (
125- groupId ,
126120 connectionId ,
127121 false ,
128122 makePermissions ( {
@@ -144,7 +138,6 @@ test('table with all flags true generates table:read + table:add + table:edit +
144138
145139test ( 'table with add=true only generates table:read + table:add (hasAnyAccess triggers table:read)' , ( t ) => {
146140 const result = generateCedarPolicyForGroup (
147- groupId ,
148141 connectionId ,
149142 false ,
150143 makePermissions ( {
@@ -166,7 +159,6 @@ test('table with add=true only generates table:read + table:add (hasAnyAccess tr
166159
167160test ( 'table with all flags false generates no policies for that table' , ( t ) => {
168161 const result = generateCedarPolicyForGroup (
169- groupId ,
170162 connectionId ,
171163 false ,
172164 makePermissions ( {
@@ -183,13 +175,12 @@ test('table with all flags false generates no policies for that table', (t) => {
183175} ) ;
184176
185177test ( 'all none + no tables returns empty string' , ( t ) => {
186- const result = generateCedarPolicyForGroup ( groupId , connectionId , false , makePermissions ( ) ) ;
178+ const result = generateCedarPolicyForGroup ( connectionId , false , makePermissions ( ) ) ;
187179 t . is ( result , '' ) ;
188180} ) ;
189181
190182test ( 'multiple tables generate separate policies per table with correct resource refs' , ( t ) => {
191183 const result = generateCedarPolicyForGroup (
192- groupId ,
193184 connectionId ,
194185 false ,
195186 makePermissions ( {
@@ -214,7 +205,6 @@ test('multiple tables generate separate policies per table with correct resource
214205
215206test ( 'dashboard with read=true generates only dashboard:read' , ( t ) => {
216207 const result = generateCedarPolicyForGroup (
217- groupId ,
218208 connectionId ,
219209 false ,
220210 makePermissions ( {
@@ -236,7 +226,6 @@ test('dashboard with read=true generates only dashboard:read', (t) => {
236226
237227test ( 'dashboard with all flags true generates dashboard:read + dashboard:create + dashboard:edit + dashboard:delete' , ( t ) => {
238228 const result = generateCedarPolicyForGroup (
239- groupId ,
240229 connectionId ,
241230 false ,
242231 makePermissions ( {
@@ -258,7 +247,6 @@ test('dashboard with all flags true generates dashboard:read + dashboard:create
258247
259248test ( 'dashboard with all flags false generates no policies for that dashboard' , ( t ) => {
260249 const result = generateCedarPolicyForGroup (
261- groupId ,
262250 connectionId ,
263251 false ,
264252 makePermissions ( {
@@ -276,7 +264,6 @@ test('dashboard with all flags false generates no policies for that dashboard',
276264
277265test ( 'dashboard resource ref format uses connectionId/dashboardId' , ( t ) => {
278266 const result = generateCedarPolicyForGroup (
279- groupId ,
280267 connectionId ,
281268 false ,
282269 makePermissions ( {
@@ -293,7 +280,6 @@ test('dashboard resource ref format uses connectionId/dashboardId', (t) => {
293280
294281test ( 'resource ref format validation' , ( t ) => {
295282 const result = generateCedarPolicyForGroup (
296- groupId ,
297283 connectionId ,
298284 false ,
299285 makePermissions ( {
0 commit comments