@blazedpath/commons 0.0.4 → 0.0.6

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.
@@ -0,0 +1,430 @@
1
+ [
2
+ {
3
+ "path": "debtor-stage",
4
+ "enable": true
5
+ },
6
+ {
7
+ "path": "debtor-account-stage",
8
+ "enable": true
9
+ },
10
+ {
11
+ "path": "/debtor/**",
12
+ "enable": true
13
+ },
14
+ {
15
+ "path": "/debtor-account-stage/**",
16
+ "enable": true
17
+ },
18
+ {
19
+ "path": "/debtor-stage/**",
20
+ "enable": true
21
+ },
22
+ {
23
+ "path": "/debtors/**",
24
+ "enable": true
25
+ },
26
+ {
27
+ "path": "/ledger/**",
28
+ "enable": true
29
+ },
30
+ {
31
+ "path": "/accounts/**",
32
+ "enable": true
33
+ },
34
+ {
35
+ "path": "/lam/**",
36
+ "enable": true
37
+ },
38
+ {
39
+ "path": "/lam-creditors/**",
40
+ "enable": true
41
+ },
42
+ {
43
+ "path": "/identification-type/**",
44
+ "enable": true
45
+ },
46
+ {
47
+ "path": "/contact-medium-type/**",
48
+ "enable": true
49
+ },
50
+ {
51
+ "path": "/organization-types/**",
52
+ "enable": true
53
+ },
54
+ {
55
+ "path": "/ledger/statement-cycle/**",
56
+ "enable": true
57
+ },
58
+ {
59
+ "path": "/industry-type/**",
60
+ "enable": true
61
+ },
62
+ {
63
+ "path": "/gender/**",
64
+ "enable": true
65
+ },
66
+ {
67
+ "path": "/pm-contact-medium-types/**",
68
+ "enable": true
69
+ },
70
+ {
71
+ "path": "/pm-genders/**",
72
+ "enable": true
73
+ },
74
+ {
75
+ "path": "/pm-identification-types/**",
76
+ "enable": true
77
+ },
78
+ {
79
+ "path": "/debtor/banks/**",
80
+ "enable": true
81
+ },
82
+ {
83
+ "path": "/debtor/payment-method/**",
84
+ "enable": true
85
+ },
86
+ {
87
+ "path": "/catalogs/paymentmethod/**",
88
+ "enable": true
89
+ },
90
+ {
91
+ "path": "claims-message",
92
+ "enable": true
93
+ },
94
+ {
95
+ "path": "customer-message",
96
+ "enable": true
97
+ },
98
+ {
99
+ "path": "/dim-messages/**",
100
+ "enable": true
101
+ },
102
+ {
103
+ "path": "/dim-messages-entity/**",
104
+ "enable": true
105
+ },
106
+ {
107
+ "path": "/dim-messages/history/**",
108
+ "enable": true
109
+ },
110
+ {
111
+ "path": "container-container",
112
+ "enable": true
113
+ },
114
+ {
115
+ "path": "sdd-container",
116
+ "enable": true
117
+ },
118
+ {
119
+ "path": "sct-container",
120
+ "enable": true
121
+ },
122
+ {
123
+ "path": "camt053-container",
124
+ "enable": true
125
+ },
126
+ {
127
+ "path": "transaction-type-container",
128
+ "enable": true
129
+ },
130
+ {
131
+ "path": "autopay-parameters",
132
+ "enable": true
133
+ },
134
+ {
135
+ "path": "refund-parameters",
136
+ "enable": true
137
+ },
138
+ {
139
+ "path": "invoice-container",
140
+ "enable": true
141
+ },
142
+ {
143
+ "path": "/operations/executions/**",
144
+ "enable": true
145
+ },
146
+ {
147
+ "path": "/colm/**",
148
+ "enable": true
149
+ },
150
+ {
151
+ "path": "/configuration-scorings/**",
152
+ "enable": true
153
+ },
154
+ {
155
+ "path": "/configuration-scorings-variables/**",
156
+ "enable": true
157
+ },
158
+ {
159
+ "path": "/debtors/accountScoring/**",
160
+ "enable": true
161
+ },
162
+ {
163
+ "path": "/segmentation/types/**",
164
+ "enable": true
165
+ },
166
+ {
167
+ "path": "/segmentation/segments/**",
168
+ "enable": true
169
+ },
170
+ {
171
+ "path": "/debtors/accountSegment/**",
172
+ "enable": true
173
+ },
174
+ {
175
+ "path": "/segmentation/**",
176
+ "enable": true
177
+ },
178
+ {
179
+ "path": "/predefined-filters/**",
180
+ "enable": true
181
+ },
182
+ {
183
+ "path": "/actions/**",
184
+ "enable": true
185
+ },
186
+ {
187
+ "path": "/watcher-types/**",
188
+ "enable": true
189
+ },
190
+ {
191
+ "path": "/watchers/**",
192
+ "enable": true
193
+ },
194
+ {
195
+ "path": "/special-marks/**",
196
+ "enable": true
197
+ },
198
+ {
199
+ "path": "/fnc/**",
200
+ "enable": true
201
+ },
202
+ {
203
+ "path": "/paymentcommit/**",
204
+ "enable": true
205
+ },
206
+ {
207
+ "path": "placement-collector",
208
+ "enable": true
209
+ },
210
+ {
211
+ "path": "placement-debtor",
212
+ "enable": true
213
+ },
214
+ {
215
+ "path": "placement-types",
216
+ "enable": true
217
+ },
218
+ {
219
+ "path": "typeFormer",
220
+ "enable": true
221
+ },
222
+ {
223
+ "path": "/plc-place-entity/**",
224
+ "enable": true
225
+ },
226
+ {
227
+ "path": "/plc-placement-types/**",
228
+ "enable": true
229
+ },
230
+ {
231
+ "path": "/plc-placement-config/**",
232
+ "enable": true
233
+ },
234
+ {
235
+ "path": "/cmp-plc-placement-View/**",
236
+ "enable": true
237
+ },
238
+ {
239
+ "path": "/cmp-plc-placement-trace/**",
240
+ "enable": true
241
+ },
242
+ {
243
+ "path": "/cmp-plc-placed-entity/**",
244
+ "enable": true
245
+ },
246
+ {
247
+ "path": "/cmp-plc-placement-version/**",
248
+ "enable": true
249
+ },
250
+ {
251
+ "path": "/cmp-plc-placement-type-former/**",
252
+ "enable": true
253
+ },
254
+ {
255
+ "path": "/cmp-plc-massive-reassignment-view/**",
256
+ "enable": true
257
+ },
258
+ {
259
+ "path": "/con-aggregated-transactions/**",
260
+ "enable": true
261
+ },
262
+ {
263
+ "path": "/dunning/**",
264
+ "enable": true
265
+ },
266
+ {
267
+ "path": "/channels/**",
268
+ "enable": true
269
+ },
270
+ {
271
+ "path": "/templates/**",
272
+ "enable": true
273
+ },
274
+ {
275
+ "path": "/template-decisions/**",
276
+ "enable": true
277
+ },
278
+ {
279
+ "path": "/sim-scenarios/**",
280
+ "enable": true
281
+ },
282
+ {
283
+ "path": "/special-marks/provider/**",
284
+ "enable": true
285
+ },
286
+ {
287
+ "path": "/sim-simulations/**",
288
+ "enable": true
289
+ },
290
+ {
291
+ "path": "/sim-strategies/**",
292
+ "enable": true
293
+ },
294
+ {
295
+ "path": "/roles/**",
296
+ "enable": true
297
+ },
298
+ {
299
+ "path": "/bulk-actions/**",
300
+ "enable": true
301
+ },
302
+ {
303
+ "path": "/tsch-tasks/**",
304
+ "enable": true
305
+ },
306
+ {
307
+ "path": "/tsch-http-operations/**",
308
+ "enable": true
309
+ },
310
+ {
311
+ "path": "/tsch-executions/**",
312
+ "enable": true
313
+ },
314
+ {
315
+ "path": "/entry-process-config/**",
316
+ "enable": true
317
+ },
318
+ {
319
+ "path": "/entry-process-config-old/**",
320
+ "enable": true
321
+ },
322
+ {
323
+ "path": "/ep-config/**",
324
+ "enable": true
325
+ },
326
+ {
327
+ "path": "/approval-instances/**",
328
+ "enable": true
329
+ },
330
+ {
331
+ "path": "/cb-approval-domain/**",
332
+ "enable": true
333
+ },
334
+ {
335
+ "path": "/cb-approval-reject-reason/**",
336
+ "enable": true
337
+ },
338
+ {
339
+ "path": "/cb-approval-spec/**",
340
+ "enable": true
341
+ },
342
+ {
343
+ "path": "/cb-approval-spec-type/**",
344
+ "enable": true
345
+ },
346
+ {
347
+ "path": "/bkr/**",
348
+ "enable": true
349
+ },
350
+ {
351
+ "path": "/blacklist-home/**",
352
+ "enable": true
353
+ },
354
+ {
355
+ "path": "/con-criteria-sets/**",
356
+ "enable": true
357
+ },
358
+ {
359
+ "path": "/con-transactions/**",
360
+ "enable": true
361
+ },
362
+ {
363
+ "path": "/dispute-settings/**",
364
+ "enable": true
365
+ },
366
+ {
367
+ "path": "/exemptions/**",
368
+ "enable": true
369
+ },
370
+ {
371
+ "path": "/holidays/**",
372
+ "enable": true
373
+ },
374
+ {
375
+ "path": "/inbox/config",
376
+ "enable": true
377
+ },
378
+ {
379
+ "path": "/collection-home",
380
+ "enable": true
381
+ },
382
+ {
383
+ "path": "/ep-manua-historicall-credit/**",
384
+ "enable": true
385
+ },
386
+ {
387
+ "path": "/ep-manua-historicall-debit/**",
388
+ "enable": true
389
+ },
390
+ {
391
+ "path": "/ep-manual-selected/**",
392
+ "enable": true
393
+ },
394
+ {
395
+ "path": "/ep-out-manual-credit/**",
396
+ "enable": true
397
+ },
398
+ {
399
+ "path": "/ep-out-manual-debit/**",
400
+ "enable": true
401
+ },
402
+ {
403
+ "path": "/collection-home/**",
404
+ "enable": false
405
+ },
406
+ {
407
+ "path": "/ep-manual-credit/**",
408
+ "enable": false
409
+ },
410
+ {
411
+ "path": "/ep-manual-debit/**",
412
+ "enable": false
413
+ },
414
+ {
415
+ "path": "/ep-out-manual-credit",
416
+ "enable": false
417
+ },
418
+ {
419
+ "path": "/exemptions/reasons/**",
420
+ "enable": false
421
+ },
422
+ {
423
+ "path": "/exemptions/settings/**",
424
+ "enable": false
425
+ },
426
+ {
427
+ "path": "/operations/**",
428
+ "enable": false
429
+ }
430
+ ]
@@ -16,12 +16,21 @@ async function getAuthorizationService(configPath) {
16
16
 
17
17
 
18
18
  ;(async () => {
19
+
20
+
19
21
 
20
22
  const authorizationService = await getAuthorizationService('../__test__/AuthorizationKpn.yaml')
21
- console.log(authorizationService.defaultAuthorized('/payment-responsibles', null, ['Collections.ViewOnly']))
22
- console.log(authorizationService.defaultAuthorized('/taskManagement/mainInboxes/', null, ['Collections.ViewOnly']))
23
- console.log(authorizationService.defaultAuthorized('/colm/autopay', null, ['Collections.ViewOnly']))
24
- console.log(authorizationService.defaultAuthorized('/colm/refundorders', null, ['Collections.ViewOnly']))
25
- console.log(authorizationService.defaultAuthorized('/debtors', null, ['Collections.ViewOnly']))
23
+
24
+ // expect('[{"path":"/api/ms-financing-setting/fnc-catalog","actions":"*","enable":true}]').toStrictEqual(result)
25
+
26
+ // console.log(authorizationService.getFrontendSecurityRules(["Configuration.Admin"],["config"] ))
27
+ // console.log(JSON.stringify(authorizationService.getFrontendSecurityRules(['Configuration.Admin'],['agent'] )))
28
+ const result = authorizationService.checkAuthorize('/ep-manual-credit/undefined', null, ['Configuration.Admin'], ['agent'])
29
+ console.log(result)
30
+ result = authorizationService.checkAuthorize('/ep-manual-credit/undefined', null, ['Collections.Admin','Collections.Finance','Configuration.Admin'], ['agent'])
31
+ console.log(result)
32
+
33
+
34
+
26
35
 
27
36
  })()