@drodil/backstage-plugin-qeta-node 3.47.2 → 3.48.0

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.
package/dist/index.cjs.js CHANGED
@@ -12,12 +12,28 @@ exports.qetaAIExtensionPoint = extensions.qetaAIExtensionPoint;
12
12
  exports.qetaNotificationReceiversExtensionPoint = extensions.qetaNotificationReceiversExtensionPoint;
13
13
  exports.qetaTagDatabaseExtensionPoint = extensions.qetaTagDatabaseExtensionPoint;
14
14
  exports.answerAuthorConditionFactory = permissionRules.answerAuthorConditionFactory;
15
+ exports.answerQuestionAnyTagConditionFactory = permissionRules.answerQuestionAnyTagConditionFactory;
16
+ exports.answerQuestionDoesNotHaveEntitiesConditionFactory = permissionRules.answerQuestionDoesNotHaveEntitiesConditionFactory;
17
+ exports.answerQuestionDoesNotHaveEntityRefs = permissionRules.answerQuestionDoesNotHaveEntityRefs;
18
+ exports.answerQuestionDoesNotHaveTags = permissionRules.answerQuestionDoesNotHaveTags;
19
+ exports.answerQuestionDoesNotHaveTagsConditionFactory = permissionRules.answerQuestionDoesNotHaveTagsConditionFactory;
15
20
  exports.answerQuestionEntitiesConditionFactory = permissionRules.answerQuestionEntitiesConditionFactory;
21
+ exports.answerQuestionHasAnyEntitiesConditionFactory = permissionRules.answerQuestionHasAnyEntitiesConditionFactory;
22
+ exports.answerQuestionHasAnyEntityRefs = permissionRules.answerQuestionHasAnyEntityRefs;
23
+ exports.answerQuestionHasAnyTag = permissionRules.answerQuestionHasAnyTag;
16
24
  exports.answerQuestionHasEntityRefs = permissionRules.answerQuestionHasEntityRefs;
17
25
  exports.answerQuestionHasTags = permissionRules.answerQuestionHasTags;
18
26
  exports.answerQuestionTagsConditionFactory = permissionRules.answerQuestionTagsConditionFactory;
19
27
  exports.answerRules = permissionRules.answerRules;
20
28
  exports.answerTagExpertConditionFactory = permissionRules.answerTagExpertConditionFactory;
29
+ exports.collectionDoesNotHaveEntities = permissionRules.collectionDoesNotHaveEntities;
30
+ exports.collectionDoesNotHaveEntitiesConditionFactory = permissionRules.collectionDoesNotHaveEntitiesConditionFactory;
31
+ exports.collectionDoesNotHaveTags = permissionRules.collectionDoesNotHaveTags;
32
+ exports.collectionDoesNotHaveTagsConditionFactory = permissionRules.collectionDoesNotHaveTagsConditionFactory;
33
+ exports.collectionHasAnyEntity = permissionRules.collectionHasAnyEntity;
34
+ exports.collectionHasAnyEntityConditionFactory = permissionRules.collectionHasAnyEntityConditionFactory;
35
+ exports.collectionHasAnyTag = permissionRules.collectionHasAnyTag;
36
+ exports.collectionHasAnyTagConditionFactory = permissionRules.collectionHasAnyTagConditionFactory;
21
37
  exports.collectionHasEntities = permissionRules.collectionHasEntities;
22
38
  exports.collectionHasEntitiesConditionFactory = permissionRules.collectionHasEntitiesConditionFactory;
23
39
  exports.collectionHasTags = permissionRules.collectionHasTags;
@@ -37,6 +53,14 @@ exports.isPostTagExpert = permissionRules.isPostTagExpert;
37
53
  exports.isTag = permissionRules.isTag;
38
54
  exports.isTagExpert = permissionRules.isTagExpert;
39
55
  exports.postAuthorConditionFactory = permissionRules.postAuthorConditionFactory;
56
+ exports.postDoesNotHaveEntities = permissionRules.postDoesNotHaveEntities;
57
+ exports.postDoesNotHaveEntitiesConditionFactory = permissionRules.postDoesNotHaveEntitiesConditionFactory;
58
+ exports.postDoesNotHaveTags = permissionRules.postDoesNotHaveTags;
59
+ exports.postDoesNotHaveTagsConditionFactory = permissionRules.postDoesNotHaveTagsConditionFactory;
60
+ exports.postHasAnyEntity = permissionRules.postHasAnyEntity;
61
+ exports.postHasAnyEntityConditionFactory = permissionRules.postHasAnyEntityConditionFactory;
62
+ exports.postHasAnyTag = permissionRules.postHasAnyTag;
63
+ exports.postHasAnyTagConditionFactory = permissionRules.postHasAnyTagConditionFactory;
40
64
  exports.postHasEntities = permissionRules.postHasEntities;
41
65
  exports.postHasEntitiesConditionFactory = permissionRules.postHasEntitiesConditionFactory;
42
66
  exports.postHasTags = permissionRules.postHasTags;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/dist/index.d.ts CHANGED
@@ -111,6 +111,14 @@ declare const postHasTagsConditionFactory: (params: {
111
111
  }) => _backstage_plugin_permission_common.PermissionCondition<"post", {
112
112
  tags: string[];
113
113
  }>;
114
+ declare const postHasAnyTag: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
115
+ tags: string[];
116
+ }>;
117
+ declare const postHasAnyTagConditionFactory: (params: {
118
+ tags: string[];
119
+ }) => _backstage_plugin_permission_common.PermissionCondition<"post", {
120
+ tags: string[];
121
+ }>;
114
122
  declare const postHasEntities: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
115
123
  entityRefs: string[];
116
124
  }>;
@@ -119,6 +127,14 @@ declare const postHasEntitiesConditionFactory: (params: {
119
127
  }) => _backstage_plugin_permission_common.PermissionCondition<"post", {
120
128
  entityRefs: string[];
121
129
  }>;
130
+ declare const postHasAnyEntity: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
131
+ entityRefs: string[];
132
+ }>;
133
+ declare const postHasAnyEntityConditionFactory: (params: {
134
+ entityRefs: string[];
135
+ }) => _backstage_plugin_permission_common.PermissionCondition<"post", {
136
+ entityRefs: string[];
137
+ }>;
122
138
  declare const postHasType: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
123
139
  type: string;
124
140
  }>;
@@ -138,6 +154,22 @@ declare const postTagExpertConditionFactory: (params: {
138
154
  userRef?: string | undefined;
139
155
  claims?: string[] | undefined;
140
156
  }>;
157
+ declare const postDoesNotHaveTags: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
158
+ tags: string[];
159
+ }>;
160
+ declare const postDoesNotHaveTagsConditionFactory: (params: {
161
+ tags: string[];
162
+ }) => _backstage_plugin_permission_common.PermissionCondition<"post", {
163
+ tags: string[];
164
+ }>;
165
+ declare const postDoesNotHaveEntities: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
166
+ entityRefs: string[];
167
+ }>;
168
+ declare const postDoesNotHaveEntitiesConditionFactory: (params: {
169
+ entityRefs: string[];
170
+ }) => _backstage_plugin_permission_common.PermissionCondition<"post", {
171
+ entityRefs: string[];
172
+ }>;
141
173
  declare const postRules: {
142
174
  isPostAuthor: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
143
175
  userRef?: string | undefined;
@@ -146,9 +178,15 @@ declare const postRules: {
146
178
  postHasTags: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
147
179
  tags: string[];
148
180
  }>;
181
+ postHasAnyTag: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
182
+ tags: string[];
183
+ }>;
149
184
  postHasEntities: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
150
185
  entityRefs: string[];
151
186
  }>;
187
+ postHasAnyEntity: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
188
+ entityRefs: string[];
189
+ }>;
152
190
  postHasType: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
153
191
  type: string;
154
192
  }>;
@@ -156,6 +194,12 @@ declare const postRules: {
156
194
  userRef?: string | undefined;
157
195
  claims?: string[] | undefined;
158
196
  }>;
197
+ postDoesNotHaveTags: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
198
+ tags: string[];
199
+ }>;
200
+ postDoesNotHaveEntities: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
201
+ entityRefs: string[];
202
+ }>;
159
203
  };
160
204
  declare const isAnswerAuthor: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
161
205
  userRef?: string | undefined;
@@ -176,6 +220,14 @@ declare const answerQuestionTagsConditionFactory: (params: {
176
220
  }) => _backstage_plugin_permission_common.PermissionCondition<"answer", {
177
221
  tags: string[];
178
222
  }>;
223
+ declare const answerQuestionHasAnyTag: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
224
+ tags: string[];
225
+ }>;
226
+ declare const answerQuestionAnyTagConditionFactory: (params: {
227
+ tags: string[];
228
+ }) => _backstage_plugin_permission_common.PermissionCondition<"answer", {
229
+ tags: string[];
230
+ }>;
179
231
  declare const answerQuestionHasEntityRefs: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
180
232
  entityRefs: string[];
181
233
  }>;
@@ -184,6 +236,14 @@ declare const answerQuestionEntitiesConditionFactory: (params: {
184
236
  }) => _backstage_plugin_permission_common.PermissionCondition<"answer", {
185
237
  entityRefs: string[];
186
238
  }>;
239
+ declare const answerQuestionHasAnyEntityRefs: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
240
+ entityRefs: string[];
241
+ }>;
242
+ declare const answerQuestionHasAnyEntitiesConditionFactory: (params: {
243
+ entityRefs: string[];
244
+ }) => _backstage_plugin_permission_common.PermissionCondition<"answer", {
245
+ entityRefs: string[];
246
+ }>;
187
247
  declare const isAnswerTagExpert: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
188
248
  userRef?: string | undefined;
189
249
  claims?: string[] | undefined;
@@ -195,6 +255,22 @@ declare const answerTagExpertConditionFactory: (params: {
195
255
  userRef?: string | undefined;
196
256
  claims?: string[] | undefined;
197
257
  }>;
258
+ declare const answerQuestionDoesNotHaveTags: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
259
+ tags: string[];
260
+ }>;
261
+ declare const answerQuestionDoesNotHaveTagsConditionFactory: (params: {
262
+ tags: string[];
263
+ }) => _backstage_plugin_permission_common.PermissionCondition<"answer", {
264
+ tags: string[];
265
+ }>;
266
+ declare const answerQuestionDoesNotHaveEntityRefs: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
267
+ entityRefs: string[];
268
+ }>;
269
+ declare const answerQuestionDoesNotHaveEntitiesConditionFactory: (params: {
270
+ entityRefs: string[];
271
+ }) => _backstage_plugin_permission_common.PermissionCondition<"answer", {
272
+ entityRefs: string[];
273
+ }>;
198
274
  declare const answerRules: {
199
275
  isAnswerAuthor: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
200
276
  userRef?: string | undefined;
@@ -203,13 +279,25 @@ declare const answerRules: {
203
279
  answerQuestionHasTags: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
204
280
  tags: string[];
205
281
  }>;
282
+ answerQuestionHasAnyTag: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
283
+ tags: string[];
284
+ }>;
206
285
  answerQuestionHasEntityRefs: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
207
286
  entityRefs: string[];
208
287
  }>;
288
+ answerQuestionHasAnyEntityRefs: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
289
+ entityRefs: string[];
290
+ }>;
209
291
  isAnswerTagExpert: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
210
292
  userRef?: string | undefined;
211
293
  claims?: string[] | undefined;
212
294
  }>;
295
+ answerQuestionDoesNotHaveTags: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
296
+ tags: string[];
297
+ }>;
298
+ answerQuestionDoesNotHaveEntityRefs: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
299
+ entityRefs: string[];
300
+ }>;
213
301
  };
214
302
  declare const isCommentAuthor: _backstage_plugin_permission_node.PermissionRule<Comment, CommentFilter, "comment", {
215
303
  userRef?: string | undefined;
@@ -275,6 +363,14 @@ declare const collectionHasTagsConditionFactory: (params: {
275
363
  }) => _backstage_plugin_permission_common.PermissionCondition<"collection", {
276
364
  tags: string[];
277
365
  }>;
366
+ declare const collectionHasAnyTag: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
367
+ tags: string[];
368
+ }>;
369
+ declare const collectionHasAnyTagConditionFactory: (params: {
370
+ tags: string[];
371
+ }) => _backstage_plugin_permission_common.PermissionCondition<"collection", {
372
+ tags: string[];
373
+ }>;
278
374
  declare const collectionHasEntities: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
279
375
  entityRefs: string[];
280
376
  }>;
@@ -283,6 +379,14 @@ declare const collectionHasEntitiesConditionFactory: (params: {
283
379
  }) => _backstage_plugin_permission_common.PermissionCondition<"collection", {
284
380
  entityRefs: string[];
285
381
  }>;
382
+ declare const collectionHasAnyEntity: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
383
+ entityRefs: string[];
384
+ }>;
385
+ declare const collectionHasAnyEntityConditionFactory: (params: {
386
+ entityRefs: string[];
387
+ }) => _backstage_plugin_permission_common.PermissionCondition<"collection", {
388
+ entityRefs: string[];
389
+ }>;
286
390
  declare const isCollectionTagExpert: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
287
391
  userRef?: string | undefined;
288
392
  claims?: string[] | undefined;
@@ -294,6 +398,22 @@ declare const collectionTagExpertConditionFactory: (params: {
294
398
  userRef?: string | undefined;
295
399
  claims?: string[] | undefined;
296
400
  }>;
401
+ declare const collectionDoesNotHaveTags: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
402
+ tags: string[];
403
+ }>;
404
+ declare const collectionDoesNotHaveTagsConditionFactory: (params: {
405
+ tags: string[];
406
+ }) => _backstage_plugin_permission_common.PermissionCondition<"collection", {
407
+ tags: string[];
408
+ }>;
409
+ declare const collectionDoesNotHaveEntities: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
410
+ entityRefs: string[];
411
+ }>;
412
+ declare const collectionDoesNotHaveEntitiesConditionFactory: (params: {
413
+ entityRefs: string[];
414
+ }) => _backstage_plugin_permission_common.PermissionCondition<"collection", {
415
+ entityRefs: string[];
416
+ }>;
297
417
  declare const collectionRules: {
298
418
  isCollectionOwner: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
299
419
  userRef?: string | undefined;
@@ -302,13 +422,25 @@ declare const collectionRules: {
302
422
  collectionHasTags: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
303
423
  tags: string[];
304
424
  }>;
425
+ collectionHasAnyTag: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
426
+ tags: string[];
427
+ }>;
305
428
  collectionHasEntities: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
306
429
  entityRefs: string[];
307
430
  }>;
431
+ collectionHasAnyEntity: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
432
+ entityRefs: string[];
433
+ }>;
308
434
  isCollectionTagExpert: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
309
435
  userRef?: string | undefined;
310
436
  claims?: string[] | undefined;
311
437
  }>;
438
+ collectionDoesNotHaveTags: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
439
+ tags: string[];
440
+ }>;
441
+ collectionDoesNotHaveEntities: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
442
+ entityRefs: string[];
443
+ }>;
312
444
  };
313
445
  declare const rules: {
314
446
  isCollectionOwner: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
@@ -318,13 +450,25 @@ declare const rules: {
318
450
  collectionHasTags: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
319
451
  tags: string[];
320
452
  }>;
453
+ collectionHasAnyTag: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
454
+ tags: string[];
455
+ }>;
321
456
  collectionHasEntities: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
322
457
  entityRefs: string[];
323
458
  }>;
459
+ collectionHasAnyEntity: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
460
+ entityRefs: string[];
461
+ }>;
324
462
  isCollectionTagExpert: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
325
463
  userRef?: string | undefined;
326
464
  claims?: string[] | undefined;
327
465
  }>;
466
+ collectionDoesNotHaveTags: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
467
+ tags: string[];
468
+ }>;
469
+ collectionDoesNotHaveEntities: _backstage_plugin_permission_node.PermissionRule<Collection, CollectionFilter, "collection", {
470
+ entityRefs: string[];
471
+ }>;
328
472
  isTag: _backstage_plugin_permission_node.PermissionRule<TagResponse, TagFilter, "tag", {
329
473
  tag: string;
330
474
  }>;
@@ -339,9 +483,15 @@ declare const rules: {
339
483
  postHasTags: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
340
484
  tags: string[];
341
485
  }>;
486
+ postHasAnyTag: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
487
+ tags: string[];
488
+ }>;
342
489
  postHasEntities: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
343
490
  entityRefs: string[];
344
491
  }>;
492
+ postHasAnyEntity: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
493
+ entityRefs: string[];
494
+ }>;
345
495
  postHasType: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
346
496
  type: string;
347
497
  }>;
@@ -349,6 +499,12 @@ declare const rules: {
349
499
  userRef?: string | undefined;
350
500
  claims?: string[] | undefined;
351
501
  }>;
502
+ postDoesNotHaveTags: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
503
+ tags: string[];
504
+ }>;
505
+ postDoesNotHaveEntities: _backstage_plugin_permission_node.PermissionRule<Post, PostFilter, "post", {
506
+ entityRefs: string[];
507
+ }>;
352
508
  isAnswerAuthor: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
353
509
  userRef?: string | undefined;
354
510
  claims?: string[] | undefined;
@@ -356,13 +512,25 @@ declare const rules: {
356
512
  answerQuestionHasTags: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
357
513
  tags: string[];
358
514
  }>;
515
+ answerQuestionHasAnyTag: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
516
+ tags: string[];
517
+ }>;
359
518
  answerQuestionHasEntityRefs: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
360
519
  entityRefs: string[];
361
520
  }>;
521
+ answerQuestionHasAnyEntityRefs: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
522
+ entityRefs: string[];
523
+ }>;
362
524
  isAnswerTagExpert: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
363
525
  userRef?: string | undefined;
364
526
  claims?: string[] | undefined;
365
527
  }>;
528
+ answerQuestionDoesNotHaveTags: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
529
+ tags: string[];
530
+ }>;
531
+ answerQuestionDoesNotHaveEntityRefs: _backstage_plugin_permission_node.PermissionRule<Answer, AnswerFilter, "answer", {
532
+ entityRefs: string[];
533
+ }>;
366
534
  isCommentAuthor: _backstage_plugin_permission_node.PermissionRule<Comment, CommentFilter, "comment", {
367
535
  userRef?: string | undefined;
368
536
  claims?: string[] | undefined;
@@ -377,9 +545,15 @@ declare const questionConditions: _backstage_plugin_permission_node.Conditions<{
377
545
  postHasTags: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Post, _drodil_backstage_plugin_qeta_common.PostFilter, "post", {
378
546
  tags: string[];
379
547
  }>;
548
+ postHasAnyTag: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Post, _drodil_backstage_plugin_qeta_common.PostFilter, "post", {
549
+ tags: string[];
550
+ }>;
380
551
  postHasEntities: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Post, _drodil_backstage_plugin_qeta_common.PostFilter, "post", {
381
552
  entityRefs: string[];
382
553
  }>;
554
+ postHasAnyEntity: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Post, _drodil_backstage_plugin_qeta_common.PostFilter, "post", {
555
+ entityRefs: string[];
556
+ }>;
383
557
  postHasType: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Post, _drodil_backstage_plugin_qeta_common.PostFilter, "post", {
384
558
  type: string;
385
559
  }>;
@@ -387,6 +561,12 @@ declare const questionConditions: _backstage_plugin_permission_node.Conditions<{
387
561
  userRef?: string | undefined;
388
562
  claims?: string[] | undefined;
389
563
  }>;
564
+ postDoesNotHaveTags: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Post, _drodil_backstage_plugin_qeta_common.PostFilter, "post", {
565
+ tags: string[];
566
+ }>;
567
+ postDoesNotHaveEntities: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Post, _drodil_backstage_plugin_qeta_common.PostFilter, "post", {
568
+ entityRefs: string[];
569
+ }>;
390
570
  }>;
391
571
  declare const createPostConditionalDecision: (permission: _backstage_plugin_permission_common.ResourcePermission<"post">, conditions: _backstage_plugin_permission_common.PermissionCriteria<_backstage_plugin_permission_common.PermissionCondition<"post">>) => _backstage_plugin_permission_common.ConditionalPolicyDecision;
392
572
  declare const answerConditions: _backstage_plugin_permission_node.Conditions<{
@@ -397,13 +577,25 @@ declare const answerConditions: _backstage_plugin_permission_node.Conditions<{
397
577
  answerQuestionHasTags: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Answer, _drodil_backstage_plugin_qeta_common.AnswerFilter, "answer", {
398
578
  tags: string[];
399
579
  }>;
580
+ answerQuestionHasAnyTag: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Answer, _drodil_backstage_plugin_qeta_common.AnswerFilter, "answer", {
581
+ tags: string[];
582
+ }>;
400
583
  answerQuestionHasEntityRefs: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Answer, _drodil_backstage_plugin_qeta_common.AnswerFilter, "answer", {
401
584
  entityRefs: string[];
402
585
  }>;
586
+ answerQuestionHasAnyEntityRefs: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Answer, _drodil_backstage_plugin_qeta_common.AnswerFilter, "answer", {
587
+ entityRefs: string[];
588
+ }>;
403
589
  isAnswerTagExpert: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Answer, _drodil_backstage_plugin_qeta_common.AnswerFilter, "answer", {
404
590
  userRef?: string | undefined;
405
591
  claims?: string[] | undefined;
406
592
  }>;
593
+ answerQuestionDoesNotHaveTags: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Answer, _drodil_backstage_plugin_qeta_common.AnswerFilter, "answer", {
594
+ tags: string[];
595
+ }>;
596
+ answerQuestionDoesNotHaveEntityRefs: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Answer, _drodil_backstage_plugin_qeta_common.AnswerFilter, "answer", {
597
+ entityRefs: string[];
598
+ }>;
407
599
  }>;
408
600
  declare const createAnswerConditionalDecision: (permission: _backstage_plugin_permission_common.ResourcePermission<"answer">, conditions: _backstage_plugin_permission_common.PermissionCriteria<_backstage_plugin_permission_common.PermissionCondition<"answer">>) => _backstage_plugin_permission_common.ConditionalPolicyDecision;
409
601
  declare const commentConditions: _backstage_plugin_permission_node.Conditions<{
@@ -431,13 +623,25 @@ declare const collectionConditions: _backstage_plugin_permission_node.Conditions
431
623
  collectionHasTags: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Collection, _drodil_backstage_plugin_qeta_common.CollectionFilter, "collection", {
432
624
  tags: string[];
433
625
  }>;
626
+ collectionHasAnyTag: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Collection, _drodil_backstage_plugin_qeta_common.CollectionFilter, "collection", {
627
+ tags: string[];
628
+ }>;
434
629
  collectionHasEntities: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Collection, _drodil_backstage_plugin_qeta_common.CollectionFilter, "collection", {
435
630
  entityRefs: string[];
436
631
  }>;
632
+ collectionHasAnyEntity: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Collection, _drodil_backstage_plugin_qeta_common.CollectionFilter, "collection", {
633
+ entityRefs: string[];
634
+ }>;
437
635
  isCollectionTagExpert: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Collection, _drodil_backstage_plugin_qeta_common.CollectionFilter, "collection", {
438
636
  userRef?: string | undefined;
439
637
  claims?: string[] | undefined;
440
638
  }>;
639
+ collectionDoesNotHaveTags: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Collection, _drodil_backstage_plugin_qeta_common.CollectionFilter, "collection", {
640
+ tags: string[];
641
+ }>;
642
+ collectionDoesNotHaveEntities: _backstage_plugin_permission_node.PermissionRule<_drodil_backstage_plugin_qeta_common.Collection, _drodil_backstage_plugin_qeta_common.CollectionFilter, "collection", {
643
+ entityRefs: string[];
644
+ }>;
441
645
  }>;
442
646
  declare const createCollectionConditionalDecision: (permission: _backstage_plugin_permission_common.ResourcePermission<"collection">, conditions: _backstage_plugin_permission_common.PermissionCriteria<_backstage_plugin_permission_common.PermissionCondition<"collection">>) => _backstage_plugin_permission_common.ConditionalPolicyDecision;
443
647
 
@@ -453,4 +657,4 @@ declare class DefaultQetaPermissionPolicy implements PermissionPolicy {
453
657
  handle(request: PolicyQuery, user?: BackstageIdentityResponse): Promise<PolicyDecision>;
454
658
  }
455
659
 
456
- export { type AIHandler, DefaultQetaPermissionPolicy, type NotificationReceiversHandler, type QetaAIExtensionPoint, type QetaNotificationReceiversExtensionPoint, type QetaTagDatabaseExtensionPoint, type TagDatabase, answerAuthorConditionFactory, answerConditions, answerPermissionResourceRef, answerQuestionEntitiesConditionFactory, answerQuestionHasEntityRefs, answerQuestionHasTags, answerQuestionTagsConditionFactory, answerRules, answerTagExpertConditionFactory, collectionConditions, collectionHasEntities, collectionHasEntitiesConditionFactory, collectionHasTags, collectionHasTagsConditionFactory, collectionOwnerConditionFactory, collectionPermissionResourceRef, collectionRules, collectionTagExpertConditionFactory, commentAuthorConditionFactory, commentConditions, commentPermissionResourceRef, commentRules, createAnswerConditionalDecision, createCollectionConditionalDecision, createCommentConditionalDecision, createPostConditionalDecision, createTagConditionalDecision, isAnswerAuthor, isAnswerTagExpert, isCollectionOwner, isCollectionTagExpert, isCommentAuthor, isPostAuthor, isPostTagExpert, isTag, isTagExpert, postAuthorConditionFactory, postHasEntities, postHasEntitiesConditionFactory, postHasTags, postHasTagsConditionFactory, postHasType, postHasTypeConditionFactory, postPermissionResourceRef, postRules, postTagExpertConditionFactory, qetaAIExtensionPoint, qetaNotificationReceiversExtensionPoint, qetaTagDatabaseExtensionPoint, questionConditions, rules, tagConditionFactory, tagConditions, tagExpertConditionFactory, tagPermissionResourceRef, tagRules };
660
+ export { type AIHandler, DefaultQetaPermissionPolicy, type NotificationReceiversHandler, type QetaAIExtensionPoint, type QetaNotificationReceiversExtensionPoint, type QetaTagDatabaseExtensionPoint, type TagDatabase, answerAuthorConditionFactory, answerConditions, answerPermissionResourceRef, answerQuestionAnyTagConditionFactory, answerQuestionDoesNotHaveEntitiesConditionFactory, answerQuestionDoesNotHaveEntityRefs, answerQuestionDoesNotHaveTags, answerQuestionDoesNotHaveTagsConditionFactory, answerQuestionEntitiesConditionFactory, answerQuestionHasAnyEntitiesConditionFactory, answerQuestionHasAnyEntityRefs, answerQuestionHasAnyTag, answerQuestionHasEntityRefs, answerQuestionHasTags, answerQuestionTagsConditionFactory, answerRules, answerTagExpertConditionFactory, collectionConditions, collectionDoesNotHaveEntities, collectionDoesNotHaveEntitiesConditionFactory, collectionDoesNotHaveTags, collectionDoesNotHaveTagsConditionFactory, collectionHasAnyEntity, collectionHasAnyEntityConditionFactory, collectionHasAnyTag, collectionHasAnyTagConditionFactory, collectionHasEntities, collectionHasEntitiesConditionFactory, collectionHasTags, collectionHasTagsConditionFactory, collectionOwnerConditionFactory, collectionPermissionResourceRef, collectionRules, collectionTagExpertConditionFactory, commentAuthorConditionFactory, commentConditions, commentPermissionResourceRef, commentRules, createAnswerConditionalDecision, createCollectionConditionalDecision, createCommentConditionalDecision, createPostConditionalDecision, createTagConditionalDecision, isAnswerAuthor, isAnswerTagExpert, isCollectionOwner, isCollectionTagExpert, isCommentAuthor, isPostAuthor, isPostTagExpert, isTag, isTagExpert, postAuthorConditionFactory, postDoesNotHaveEntities, postDoesNotHaveEntitiesConditionFactory, postDoesNotHaveTags, postDoesNotHaveTagsConditionFactory, postHasAnyEntity, postHasAnyEntityConditionFactory, postHasAnyTag, postHasAnyTagConditionFactory, postHasEntities, postHasEntitiesConditionFactory, postHasTags, postHasTagsConditionFactory, postHasType, postHasTypeConditionFactory, postPermissionResourceRef, postRules, postTagExpertConditionFactory, qetaAIExtensionPoint, qetaNotificationReceiversExtensionPoint, qetaTagDatabaseExtensionPoint, questionConditions, rules, tagConditionFactory, tagConditions, tagExpertConditionFactory, tagPermissionResourceRef, tagRules };
@@ -33,6 +33,27 @@ const postHasTags = pluginPermissionNode.createPermissionRule({
33
33
  apply: (resource, { tags }) => {
34
34
  return tags.every((t) => resource?.tags?.includes(t));
35
35
  },
36
+ toQuery: ({ tags }) => {
37
+ const filters = tags.map((e) => ({
38
+ property: "tags",
39
+ values: [e]
40
+ }));
41
+ return {
42
+ allOf: filters
43
+ };
44
+ }
45
+ });
46
+ const postHasTagsConditionFactory = pluginPermissionNode.createConditionFactory(postHasTags);
47
+ const postHasAnyTag = pluginPermissionNode.createPermissionRule({
48
+ name: "HAS_ANY_TAG",
49
+ description: "Should allow only if the post has any of the specific tags",
50
+ resourceRef: permissionResources.postPermissionResourceRef,
51
+ paramsSchema: zod.z.object({
52
+ tags: zod.z.array(zod.z.string()).describe("Tag to match the post")
53
+ }),
54
+ apply: (resource, { tags }) => {
55
+ return tags.some((t) => resource?.tags?.includes(t));
56
+ },
36
57
  toQuery: ({ tags }) => {
37
58
  return {
38
59
  property: "tags",
@@ -40,7 +61,7 @@ const postHasTags = pluginPermissionNode.createPermissionRule({
40
61
  };
41
62
  }
42
63
  });
43
- const postHasTagsConditionFactory = pluginPermissionNode.createConditionFactory(postHasTags);
64
+ const postHasAnyTagConditionFactory = pluginPermissionNode.createConditionFactory(postHasAnyTag);
44
65
  const postHasEntities = pluginPermissionNode.createPermissionRule({
45
66
  name: "HAS_ENTITIES",
46
67
  description: "Should allow only if the post has all the specific entities",
@@ -51,6 +72,27 @@ const postHasEntities = pluginPermissionNode.createPermissionRule({
51
72
  apply: (resource, { entityRefs }) => {
52
73
  return entityRefs.every((t) => resource?.entities?.includes(t));
53
74
  },
75
+ toQuery: ({ entityRefs }) => {
76
+ const filters = entityRefs.map((e) => ({
77
+ property: "entityRefs",
78
+ values: [e]
79
+ }));
80
+ return {
81
+ allOf: filters
82
+ };
83
+ }
84
+ });
85
+ const postHasEntitiesConditionFactory = pluginPermissionNode.createConditionFactory(postHasEntities);
86
+ const postHasAnyEntity = pluginPermissionNode.createPermissionRule({
87
+ name: "HAS_ANY_ENTITY",
88
+ description: "Should allow only if the post has any of the specific entities",
89
+ resourceRef: permissionResources.postPermissionResourceRef,
90
+ paramsSchema: zod.z.object({
91
+ entityRefs: zod.z.array(zod.z.string()).describe("Entity refs to match the post")
92
+ }),
93
+ apply: (resource, { entityRefs }) => {
94
+ return entityRefs.some((t) => resource?.entities?.includes(t));
95
+ },
54
96
  toQuery: ({ entityRefs }) => {
55
97
  return {
56
98
  property: "entityRefs",
@@ -58,7 +100,7 @@ const postHasEntities = pluginPermissionNode.createPermissionRule({
58
100
  };
59
101
  }
60
102
  });
61
- const postHasEntitiesConditionFactory = pluginPermissionNode.createConditionFactory(postHasEntities);
103
+ const postHasAnyEntityConditionFactory = pluginPermissionNode.createConditionFactory(postHasAnyEntity);
62
104
  const postHasType = pluginPermissionNode.createPermissionRule({
63
105
  name: "HAS_TYPE",
64
106
  description: "Should allow only if the post has the specific type",
@@ -98,12 +140,58 @@ const isPostTagExpert = pluginPermissionNode.createPermissionRule({
98
140
  }
99
141
  });
100
142
  const postTagExpertConditionFactory = pluginPermissionNode.createConditionFactory(isPostTagExpert);
143
+ const postDoesNotHaveTags = pluginPermissionNode.createPermissionRule({
144
+ name: "DOES_NOT_HAVE_TAGS",
145
+ description: "Should allow only if the post does not have any of the specific tags",
146
+ resourceRef: permissionResources.postPermissionResourceRef,
147
+ paramsSchema: zod.z.object({
148
+ tags: zod.z.array(zod.z.string()).describe("Tags that should not be on the post")
149
+ }),
150
+ apply: (resource, { tags }) => {
151
+ return !tags.some((t) => resource?.tags?.includes(t));
152
+ },
153
+ toQuery: ({ tags }) => {
154
+ return {
155
+ not: {
156
+ property: "tags",
157
+ values: tags
158
+ }
159
+ };
160
+ }
161
+ });
162
+ const postDoesNotHaveTagsConditionFactory = pluginPermissionNode.createConditionFactory(postDoesNotHaveTags);
163
+ const postDoesNotHaveEntities = pluginPermissionNode.createPermissionRule({
164
+ name: "DOES_NOT_HAVE_ENTITIES",
165
+ description: "Should allow only if the post does not have any of the specific entities",
166
+ resourceRef: permissionResources.postPermissionResourceRef,
167
+ paramsSchema: zod.z.object({
168
+ entityRefs: zod.z.array(zod.z.string()).describe("Entity refs that should not be on the post")
169
+ }),
170
+ apply: (resource, { entityRefs }) => {
171
+ return !entityRefs.some((t) => resource?.entities?.includes(t));
172
+ },
173
+ toQuery: ({ entityRefs }) => {
174
+ return {
175
+ not: {
176
+ property: "entityRefs",
177
+ values: entityRefs
178
+ }
179
+ };
180
+ }
181
+ });
182
+ const postDoesNotHaveEntitiesConditionFactory = pluginPermissionNode.createConditionFactory(
183
+ postDoesNotHaveEntities
184
+ );
101
185
  const postRules = {
102
186
  isPostAuthor,
103
187
  postHasTags,
188
+ postHasAnyTag,
104
189
  postHasEntities,
190
+ postHasAnyEntity,
105
191
  postHasType,
106
- isPostTagExpert
192
+ isPostTagExpert,
193
+ postDoesNotHaveTags,
194
+ postDoesNotHaveEntities
107
195
  };
108
196
  const isAnswerAuthor = pluginPermissionNode.createPermissionRule({
109
197
  name: "IS_AUTHOR",
@@ -135,15 +223,38 @@ const answerQuestionHasTags = pluginPermissionNode.createPermissionRule({
135
223
  return tags.every((t) => resource?.post?.tags?.includes(t));
136
224
  },
137
225
  toQuery: ({ tags }) => {
138
- return {
226
+ const filters = tags.map((e) => ({
139
227
  property: "tags",
140
- values: tags
228
+ values: [e]
229
+ }));
230
+ return {
231
+ allOf: filters
141
232
  };
142
233
  }
143
234
  });
144
235
  const answerQuestionTagsConditionFactory = pluginPermissionNode.createConditionFactory(
145
236
  answerQuestionHasTags
146
237
  );
238
+ const answerQuestionHasAnyTag = pluginPermissionNode.createPermissionRule({
239
+ name: "HAS_ANY_TAG",
240
+ description: "Should allow only if the answers question has any of the specific tags",
241
+ resourceRef: permissionResources.answerPermissionResourceRef,
242
+ paramsSchema: zod.z.object({
243
+ tags: zod.z.array(zod.z.string()).describe("Tag to match the question")
244
+ }),
245
+ apply: (resource, { tags }) => {
246
+ return tags.some((t) => resource?.post?.tags?.includes(t));
247
+ },
248
+ toQuery: ({ tags }) => {
249
+ return {
250
+ property: "tags",
251
+ values: tags
252
+ };
253
+ }
254
+ });
255
+ const answerQuestionAnyTagConditionFactory = pluginPermissionNode.createConditionFactory(
256
+ answerQuestionHasAnyTag
257
+ );
147
258
  const answerQuestionHasEntityRefs = pluginPermissionNode.createPermissionRule({
148
259
  name: "HAS_ENTITIES",
149
260
  description: "Should allow only if the answers question has all the specific entities",
@@ -155,15 +266,36 @@ const answerQuestionHasEntityRefs = pluginPermissionNode.createPermissionRule({
155
266
  return entityRefs.every((t) => resource?.post?.entities?.includes(t));
156
267
  },
157
268
  toQuery: ({ entityRefs }) => {
158
- return {
269
+ const filters = entityRefs.map((e) => ({
159
270
  property: "entityRefs",
160
- values: entityRefs
271
+ values: [e]
272
+ }));
273
+ return {
274
+ allOf: filters
161
275
  };
162
276
  }
163
277
  });
164
278
  const answerQuestionEntitiesConditionFactory = pluginPermissionNode.createConditionFactory(
165
279
  answerQuestionHasEntityRefs
166
280
  );
281
+ const answerQuestionHasAnyEntityRefs = pluginPermissionNode.createPermissionRule({
282
+ name: "HAS_ANY_ENTITIES",
283
+ description: "Should allow only if the answers question has any of the specific entities",
284
+ resourceRef: permissionResources.answerPermissionResourceRef,
285
+ paramsSchema: zod.z.object({
286
+ entityRefs: zod.z.array(zod.z.string()).describe("Tag to match the question")
287
+ }),
288
+ apply: (resource, { entityRefs }) => {
289
+ return entityRefs.some((t) => resource?.post?.entities?.includes(t));
290
+ },
291
+ toQuery: ({ entityRefs }) => {
292
+ return {
293
+ property: "entityRefs",
294
+ values: entityRefs
295
+ };
296
+ }
297
+ });
298
+ const answerQuestionHasAnyEntitiesConditionFactory = pluginPermissionNode.createConditionFactory(answerQuestionHasEntityRefs);
167
299
  const isAnswerTagExpert = pluginPermissionNode.createPermissionRule({
168
300
  name: "IS_ANSWER_TAG_EXPERT",
169
301
  description: "Allows if answers post has tags the user is expert of",
@@ -185,11 +317,55 @@ const isAnswerTagExpert = pluginPermissionNode.createPermissionRule({
185
317
  }
186
318
  });
187
319
  const answerTagExpertConditionFactory = pluginPermissionNode.createConditionFactory(isAnswerTagExpert);
320
+ const answerQuestionDoesNotHaveTags = pluginPermissionNode.createPermissionRule({
321
+ name: "DOES_NOT_HAVE_TAGS",
322
+ description: "Should allow only if the answers question does not have any of the specific tags",
323
+ resourceRef: permissionResources.answerPermissionResourceRef,
324
+ paramsSchema: zod.z.object({
325
+ tags: zod.z.array(zod.z.string()).describe("Tags that should not be on the question")
326
+ }),
327
+ apply: (resource, { tags }) => {
328
+ return !tags.some((t) => resource?.post?.tags?.includes(t));
329
+ },
330
+ toQuery: ({ tags }) => {
331
+ return {
332
+ not: {
333
+ property: "tags",
334
+ values: tags
335
+ }
336
+ };
337
+ }
338
+ });
339
+ const answerQuestionDoesNotHaveTagsConditionFactory = pluginPermissionNode.createConditionFactory(answerQuestionDoesNotHaveTags);
340
+ const answerQuestionDoesNotHaveEntityRefs = pluginPermissionNode.createPermissionRule({
341
+ name: "DOES_NOT_HAVE_ENTITIES",
342
+ description: "Should allow only if the answers question does not have any of the specific entities",
343
+ resourceRef: permissionResources.answerPermissionResourceRef,
344
+ paramsSchema: zod.z.object({
345
+ entityRefs: zod.z.array(zod.z.string()).describe("Entity refs that should not be on the question")
346
+ }),
347
+ apply: (resource, { entityRefs }) => {
348
+ return !entityRefs.some((t) => resource?.post?.entities?.includes(t));
349
+ },
350
+ toQuery: ({ entityRefs }) => {
351
+ return {
352
+ not: {
353
+ property: "entityRefs",
354
+ values: entityRefs
355
+ }
356
+ };
357
+ }
358
+ });
359
+ const answerQuestionDoesNotHaveEntitiesConditionFactory = pluginPermissionNode.createConditionFactory(answerQuestionDoesNotHaveEntityRefs);
188
360
  const answerRules = {
189
361
  isAnswerAuthor,
190
362
  answerQuestionHasTags,
363
+ answerQuestionHasAnyTag,
191
364
  answerQuestionHasEntityRefs,
192
- isAnswerTagExpert
365
+ answerQuestionHasAnyEntityRefs,
366
+ isAnswerTagExpert,
367
+ answerQuestionDoesNotHaveTags,
368
+ answerQuestionDoesNotHaveEntityRefs
193
369
  };
194
370
  const isCommentAuthor = pluginPermissionNode.createPermissionRule({
195
371
  name: "IS_AUTHOR",
@@ -280,6 +456,27 @@ const collectionHasTags = pluginPermissionNode.createPermissionRule({
280
456
  apply: (resource, { tags }) => {
281
457
  return tags.every((t) => resource?.tags?.includes(t));
282
458
  },
459
+ toQuery: ({ tags }) => {
460
+ const filters = tags.map((e) => ({
461
+ property: "tags",
462
+ values: [e]
463
+ }));
464
+ return {
465
+ allOf: filters
466
+ };
467
+ }
468
+ });
469
+ const collectionHasTagsConditionFactory = pluginPermissionNode.createConditionFactory(collectionHasTags);
470
+ const collectionHasAnyTag = pluginPermissionNode.createPermissionRule({
471
+ name: "HAS_ANY_TAG",
472
+ description: "Should allow only if the posts in the collection have some of the specific tags",
473
+ resourceRef: permissionResources.collectionPermissionResourceRef,
474
+ paramsSchema: zod.z.object({
475
+ tags: zod.z.array(zod.z.string()).describe("Tag to match the collection")
476
+ }),
477
+ apply: (resource, { tags }) => {
478
+ return tags.some((t) => resource?.tags?.includes(t));
479
+ },
283
480
  toQuery: ({ tags }) => {
284
481
  return {
285
482
  property: "tags",
@@ -287,10 +484,10 @@ const collectionHasTags = pluginPermissionNode.createPermissionRule({
287
484
  };
288
485
  }
289
486
  });
290
- const collectionHasTagsConditionFactory = pluginPermissionNode.createConditionFactory(collectionHasTags);
487
+ const collectionHasAnyTagConditionFactory = pluginPermissionNode.createConditionFactory(collectionHasAnyTag);
291
488
  const collectionHasEntities = pluginPermissionNode.createPermissionRule({
292
489
  name: "HAS_ENTITIES",
293
- description: "Should allow only if the posts in the collection have the specific entities",
490
+ description: "Should allow only if the posts in the collection have all the specific entities",
294
491
  resourceRef: permissionResources.collectionPermissionResourceRef,
295
492
  paramsSchema: zod.z.object({
296
493
  entityRefs: zod.z.array(zod.z.string()).describe("Entity refs to match the collection")
@@ -299,15 +496,40 @@ const collectionHasEntities = pluginPermissionNode.createPermissionRule({
299
496
  return entityRefs.every((t) => resource?.entities?.includes(t));
300
497
  },
301
498
  toQuery: ({ entityRefs }) => {
499
+ const filters = entityRefs.map(
500
+ (e) => ({
501
+ property: "entityRefs",
502
+ values: [e]
503
+ })
504
+ );
302
505
  return {
303
- property: "entityRefs",
304
- values: entityRefs
506
+ allOf: filters
305
507
  };
306
508
  }
307
509
  });
308
510
  const collectionHasEntitiesConditionFactory = pluginPermissionNode.createConditionFactory(
309
511
  collectionHasEntities
310
512
  );
513
+ const collectionHasAnyEntity = pluginPermissionNode.createPermissionRule({
514
+ name: "HAS_ANY_ENTITY",
515
+ description: "Should allow only if the posts in the collection have some of the specific entities",
516
+ resourceRef: permissionResources.collectionPermissionResourceRef,
517
+ paramsSchema: zod.z.object({
518
+ entityRefs: zod.z.array(zod.z.string()).describe("Entity refs to match the collection")
519
+ }),
520
+ apply: (resource, { entityRefs }) => {
521
+ return entityRefs.some((t) => resource?.entities?.includes(t));
522
+ },
523
+ toQuery: ({ entityRefs }) => {
524
+ return {
525
+ property: "entityRefs",
526
+ values: entityRefs
527
+ };
528
+ }
529
+ });
530
+ const collectionHasAnyEntityConditionFactory = pluginPermissionNode.createConditionFactory(
531
+ collectionHasAnyEntity
532
+ );
311
533
  const isCollectionTagExpert = pluginPermissionNode.createPermissionRule({
312
534
  name: "IS_COLLECTION_TAG_EXPERT",
313
535
  description: "Allows if collection has tags the user is expert of",
@@ -331,11 +553,57 @@ const isCollectionTagExpert = pluginPermissionNode.createPermissionRule({
331
553
  const collectionTagExpertConditionFactory = pluginPermissionNode.createConditionFactory(
332
554
  isCollectionTagExpert
333
555
  );
556
+ const collectionDoesNotHaveTags = pluginPermissionNode.createPermissionRule({
557
+ name: "DOES_NOT_HAVE_TAGS",
558
+ description: "Should allow only if the posts in the collection do not have any of the specific tags",
559
+ resourceRef: permissionResources.collectionPermissionResourceRef,
560
+ paramsSchema: zod.z.object({
561
+ tags: zod.z.array(zod.z.string()).describe("Tags that should not be in the collection")
562
+ }),
563
+ apply: (resource, { tags }) => {
564
+ return !tags.some((t) => resource?.tags?.includes(t));
565
+ },
566
+ toQuery: ({ tags }) => {
567
+ return {
568
+ not: {
569
+ property: "tags",
570
+ values: tags
571
+ }
572
+ };
573
+ }
574
+ });
575
+ const collectionDoesNotHaveTagsConditionFactory = pluginPermissionNode.createConditionFactory(
576
+ collectionDoesNotHaveTags
577
+ );
578
+ const collectionDoesNotHaveEntities = pluginPermissionNode.createPermissionRule({
579
+ name: "DOES_NOT_HAVE_ENTITIES",
580
+ description: "Should allow only if the posts in the collection do not have any of the specific entities",
581
+ resourceRef: permissionResources.collectionPermissionResourceRef,
582
+ paramsSchema: zod.z.object({
583
+ entityRefs: zod.z.array(zod.z.string()).describe("Entity refs that should not be in the collection")
584
+ }),
585
+ apply: (resource, { entityRefs }) => {
586
+ return !entityRefs.some((t) => resource?.entities?.includes(t));
587
+ },
588
+ toQuery: ({ entityRefs }) => {
589
+ return {
590
+ not: {
591
+ property: "entityRefs",
592
+ values: entityRefs
593
+ }
594
+ };
595
+ }
596
+ });
597
+ const collectionDoesNotHaveEntitiesConditionFactory = pluginPermissionNode.createConditionFactory(collectionDoesNotHaveEntities);
334
598
  const collectionRules = {
335
599
  isCollectionOwner,
336
600
  collectionHasTags,
601
+ collectionHasAnyTag,
337
602
  collectionHasEntities,
338
- isCollectionTagExpert
603
+ collectionHasAnyEntity,
604
+ isCollectionTagExpert,
605
+ collectionDoesNotHaveTags,
606
+ collectionDoesNotHaveEntities
339
607
  };
340
608
  const rules = {
341
609
  ...commentRules,
@@ -346,12 +614,28 @@ const rules = {
346
614
  };
347
615
 
348
616
  exports.answerAuthorConditionFactory = answerAuthorConditionFactory;
617
+ exports.answerQuestionAnyTagConditionFactory = answerQuestionAnyTagConditionFactory;
618
+ exports.answerQuestionDoesNotHaveEntitiesConditionFactory = answerQuestionDoesNotHaveEntitiesConditionFactory;
619
+ exports.answerQuestionDoesNotHaveEntityRefs = answerQuestionDoesNotHaveEntityRefs;
620
+ exports.answerQuestionDoesNotHaveTags = answerQuestionDoesNotHaveTags;
621
+ exports.answerQuestionDoesNotHaveTagsConditionFactory = answerQuestionDoesNotHaveTagsConditionFactory;
349
622
  exports.answerQuestionEntitiesConditionFactory = answerQuestionEntitiesConditionFactory;
623
+ exports.answerQuestionHasAnyEntitiesConditionFactory = answerQuestionHasAnyEntitiesConditionFactory;
624
+ exports.answerQuestionHasAnyEntityRefs = answerQuestionHasAnyEntityRefs;
625
+ exports.answerQuestionHasAnyTag = answerQuestionHasAnyTag;
350
626
  exports.answerQuestionHasEntityRefs = answerQuestionHasEntityRefs;
351
627
  exports.answerQuestionHasTags = answerQuestionHasTags;
352
628
  exports.answerQuestionTagsConditionFactory = answerQuestionTagsConditionFactory;
353
629
  exports.answerRules = answerRules;
354
630
  exports.answerTagExpertConditionFactory = answerTagExpertConditionFactory;
631
+ exports.collectionDoesNotHaveEntities = collectionDoesNotHaveEntities;
632
+ exports.collectionDoesNotHaveEntitiesConditionFactory = collectionDoesNotHaveEntitiesConditionFactory;
633
+ exports.collectionDoesNotHaveTags = collectionDoesNotHaveTags;
634
+ exports.collectionDoesNotHaveTagsConditionFactory = collectionDoesNotHaveTagsConditionFactory;
635
+ exports.collectionHasAnyEntity = collectionHasAnyEntity;
636
+ exports.collectionHasAnyEntityConditionFactory = collectionHasAnyEntityConditionFactory;
637
+ exports.collectionHasAnyTag = collectionHasAnyTag;
638
+ exports.collectionHasAnyTagConditionFactory = collectionHasAnyTagConditionFactory;
355
639
  exports.collectionHasEntities = collectionHasEntities;
356
640
  exports.collectionHasEntitiesConditionFactory = collectionHasEntitiesConditionFactory;
357
641
  exports.collectionHasTags = collectionHasTags;
@@ -371,6 +655,14 @@ exports.isPostTagExpert = isPostTagExpert;
371
655
  exports.isTag = isTag;
372
656
  exports.isTagExpert = isTagExpert;
373
657
  exports.postAuthorConditionFactory = postAuthorConditionFactory;
658
+ exports.postDoesNotHaveEntities = postDoesNotHaveEntities;
659
+ exports.postDoesNotHaveEntitiesConditionFactory = postDoesNotHaveEntitiesConditionFactory;
660
+ exports.postDoesNotHaveTags = postDoesNotHaveTags;
661
+ exports.postDoesNotHaveTagsConditionFactory = postDoesNotHaveTagsConditionFactory;
662
+ exports.postHasAnyEntity = postHasAnyEntity;
663
+ exports.postHasAnyEntityConditionFactory = postHasAnyEntityConditionFactory;
664
+ exports.postHasAnyTag = postHasAnyTag;
665
+ exports.postHasAnyTagConditionFactory = postHasAnyTagConditionFactory;
374
666
  exports.postHasEntities = postHasEntities;
375
667
  exports.postHasEntitiesConditionFactory = postHasEntitiesConditionFactory;
376
668
  exports.postHasTags = postHasTags;
@@ -1 +1 @@
1
- {"version":3,"file":"permissionRules.cjs.js","sources":["../src/permissionRules.ts"],"sourcesContent":["import {\n createConditionFactory,\n createPermissionRule,\n} from '@backstage/plugin-permission-node';\nimport { z } from 'zod';\nimport {\n Answer,\n AnswerFilter,\n Collection,\n CollectionFilter,\n Comment,\n CommentFilter,\n Post,\n PostFilter,\n TagFilter,\n TagResponse,\n} from '@drodil/backstage-plugin-qeta-common';\nimport {\n answerPermissionResourceRef,\n collectionPermissionResourceRef,\n commentPermissionResourceRef,\n postPermissionResourceRef,\n tagPermissionResourceRef,\n} from './permissionResources';\n\nexport const isPostAuthor = createPermissionRule({\n name: 'IS_AUTHOR',\n description: 'Should allow only if the post is created by the user',\n resourceRef: postPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z.string().describe('User ID to match on the author').optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within author'),\n }),\n apply: (resource: Post, { userRef, claims = [] }) => {\n return resource?.author === userRef || claims.includes(resource?.author);\n },\n toQuery: ({ userRef, claims = [] }) => {\n return {\n property: 'posts.author' as PostFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const postAuthorConditionFactory = createConditionFactory(isPostAuthor);\n\nexport const postHasTags = createPermissionRule({\n name: 'HAS_TAGS',\n description: 'Should allow only if the post has all the specific tags',\n resourceRef: postPermissionResourceRef,\n paramsSchema: z.object({\n tags: z.array(z.string()).describe('Tag to match the post'),\n }),\n apply: (resource: Post, { tags }) => {\n return tags.every(t => resource?.tags?.includes(t));\n },\n toQuery: ({ tags }) => {\n return {\n property: 'tags' as PostFilter['property'],\n values: tags,\n };\n },\n});\n\nexport const postHasTagsConditionFactory = createConditionFactory(postHasTags);\n\nexport const postHasEntities = createPermissionRule({\n name: 'HAS_ENTITIES',\n description: 'Should allow only if the post has all the specific entities',\n resourceRef: postPermissionResourceRef,\n paramsSchema: z.object({\n entityRefs: z.array(z.string()).describe('Entity refs to match the post'),\n }),\n apply: (resource: Post, { entityRefs }) => {\n return entityRefs.every(t => resource?.entities?.includes(t));\n },\n toQuery: ({ entityRefs }) => {\n return {\n property: 'entityRefs' as PostFilter['property'],\n values: entityRefs,\n };\n },\n});\n\nexport const postHasEntitiesConditionFactory =\n createConditionFactory(postHasEntities);\n\nexport const postHasType = createPermissionRule({\n name: 'HAS_TYPE',\n description: 'Should allow only if the post has the specific type',\n resourceRef: postPermissionResourceRef,\n paramsSchema: z.object({\n type: z.string().describe('Type to match the post'),\n }),\n apply: (resource: Post, { type }) => {\n return resource?.type === type;\n },\n toQuery: ({ type }) => {\n return {\n property: 'posts.type' as PostFilter['property'],\n values: [type],\n };\n },\n});\n\nexport const postHasTypeConditionFactory = createConditionFactory(postHasType);\n\nexport const isPostTagExpert = createPermissionRule({\n name: 'IS_POST_TAG_EXPERT',\n description: 'Allows if post has tags the user is expert of',\n resourceRef: postPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z\n .string()\n .describe('User ID to match on the tag expert')\n .optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within tag expert'),\n }),\n apply: (resource: Post, { userRef, claims }) => {\n return Boolean(\n resource?.experts?.some(e => e === userRef || claims?.includes(e)),\n );\n },\n toQuery: ({ claims = [], userRef }) => {\n return {\n property: 'tag.experts' as PostFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const postTagExpertConditionFactory =\n createConditionFactory(isPostTagExpert);\n\nexport const postRules = {\n isPostAuthor,\n postHasTags,\n postHasEntities,\n postHasType,\n isPostTagExpert,\n};\n\nexport const isAnswerAuthor = createPermissionRule({\n name: 'IS_AUTHOR',\n description: 'Should allow only if the answer is created by the user',\n resourceRef: answerPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z.string().describe('User ID to match on the author').optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within author'),\n }),\n apply: (resource: Answer, { userRef, claims = [] }) => {\n return resource?.author === userRef || claims.includes(resource?.author);\n },\n toQuery: ({ userRef, claims = [] }) => {\n return {\n property: 'answers.author' as AnswerFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const answerAuthorConditionFactory =\n createConditionFactory(isAnswerAuthor);\n\nexport const answerQuestionHasTags = createPermissionRule({\n name: 'HAS_TAGS',\n description:\n 'Should allow only if the answers question has all the specific tags',\n resourceRef: answerPermissionResourceRef,\n paramsSchema: z.object({\n tags: z.array(z.string()).describe('Tag to match the question'),\n }),\n apply: (resource: Answer, { tags }) => {\n return tags.every(t => resource?.post?.tags?.includes(t));\n },\n toQuery: ({ tags }) => {\n return {\n property: 'tags' as AnswerFilter['property'],\n values: tags,\n };\n },\n});\n\nexport const answerQuestionTagsConditionFactory = createConditionFactory(\n answerQuestionHasTags,\n);\n\nexport const answerQuestionHasEntityRefs = createPermissionRule({\n name: 'HAS_ENTITIES',\n description:\n 'Should allow only if the answers question has all the specific entities',\n resourceRef: answerPermissionResourceRef,\n paramsSchema: z.object({\n entityRefs: z.array(z.string()).describe('Tag to match the question'),\n }),\n apply: (resource: Answer, { entityRefs }) => {\n return entityRefs.every(t => resource?.post?.entities?.includes(t));\n },\n toQuery: ({ entityRefs }) => {\n return {\n property: 'entityRefs' as AnswerFilter['property'],\n values: entityRefs,\n };\n },\n});\n\nexport const answerQuestionEntitiesConditionFactory = createConditionFactory(\n answerQuestionHasEntityRefs,\n);\n\nexport const isAnswerTagExpert = createPermissionRule({\n name: 'IS_ANSWER_TAG_EXPERT',\n description: 'Allows if answers post has tags the user is expert of',\n resourceRef: answerPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z\n .string()\n .describe('User ID to match on the tag expert')\n .optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within tag expert'),\n }),\n apply: (resource: Answer, { userRef, claims }) => {\n return Boolean(\n resource?.experts?.some(e => e === userRef || claims?.includes(e)),\n );\n },\n toQuery: ({ claims = [], userRef }) => {\n return {\n property: 'tag.experts' as AnswerFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const answerTagExpertConditionFactory =\n createConditionFactory(isAnswerTagExpert);\n\nexport const answerRules = {\n isAnswerAuthor,\n answerQuestionHasTags,\n answerQuestionHasEntityRefs,\n isAnswerTagExpert,\n};\n\nexport const isCommentAuthor = createPermissionRule({\n name: 'IS_AUTHOR',\n description: 'Should allow only if the comment is created by the user',\n resourceRef: commentPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z.string().describe('User ID to match on the author').optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within author'),\n }),\n apply: (resource: Comment, { userRef, claims = [] }) => {\n return resource?.author === userRef || claims.includes(resource?.author);\n },\n toQuery: ({ userRef, claims = [] }) => {\n return {\n property: 'comments.author' as CommentFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const commentAuthorConditionFactory =\n createConditionFactory(isCommentAuthor);\n\nexport const commentRules = { isCommentAuthor };\n\nexport const isTag = createPermissionRule({\n name: 'IS_TAG',\n description: 'Should allow only if the tag exists',\n resourceRef: tagPermissionResourceRef,\n paramsSchema: z.object({\n tag: z.string().describe('Tag to match the post'),\n }),\n apply: (resource: TagResponse, { tag }) => {\n return resource?.tag === tag;\n },\n toQuery: ({ tag }) => {\n return {\n property: 'tags.tag' as TagFilter['property'],\n values: [tag],\n };\n },\n});\n\nexport const tagConditionFactory = createConditionFactory(isTag);\n\nexport const isTagExpert = createPermissionRule({\n name: 'IS_TAG_EXPERT',\n description: 'Allows only if user is tag expert',\n resourceRef: tagPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z\n .string()\n .describe('User ID to match on the tag expert')\n .optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within tag expert'),\n }),\n apply: (resource: TagResponse, { userRef, claims }) => {\n return Boolean(\n resource?.experts?.some(e => e === userRef || claims?.includes(e)),\n );\n },\n toQuery: ({ claims = [], userRef }) => {\n return {\n property: 'tag.experts' as TagFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const tagExpertConditionFactory = createConditionFactory(isTagExpert);\n\nexport const tagRules = { isTag, isTagExpert };\n\nexport const isCollectionOwner = createPermissionRule({\n name: 'IS_OWNER',\n description: 'Should allow only if the collection is owned by the user',\n resourceRef: collectionPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z\n .string()\n .describe('User reference to match on the owner')\n .optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within owner'),\n }),\n apply: (resource: Collection, { userRef, claims = [] }) => {\n return resource?.owner === userRef || claims.includes(resource?.owner);\n },\n toQuery: ({ userRef, claims = [] }) => {\n return {\n property: 'collections.owner' as CollectionFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const collectionOwnerConditionFactory =\n createConditionFactory(isCollectionOwner);\n\nexport const collectionHasTags = createPermissionRule({\n name: 'HAS_TAGS',\n description:\n 'Should allow only if the posts in the collection have the specific tags',\n resourceRef: collectionPermissionResourceRef,\n paramsSchema: z.object({\n tags: z.array(z.string()).describe('Tag to match the collection'),\n }),\n apply: (resource: Collection, { tags }) => {\n return tags.every(t => resource?.tags?.includes(t));\n },\n toQuery: ({ tags }) => {\n return {\n property: 'tags' as CollectionFilter['property'],\n values: tags,\n };\n },\n});\n\nexport const collectionHasTagsConditionFactory =\n createConditionFactory(collectionHasTags);\n\nexport const collectionHasEntities = createPermissionRule({\n name: 'HAS_ENTITIES',\n description:\n 'Should allow only if the posts in the collection have the specific entities',\n resourceRef: collectionPermissionResourceRef,\n paramsSchema: z.object({\n entityRefs: z\n .array(z.string())\n .describe('Entity refs to match the collection'),\n }),\n apply: (resource: Collection, { entityRefs }) => {\n return entityRefs.every(t => resource?.entities?.includes(t));\n },\n toQuery: ({ entityRefs }) => {\n return {\n property: 'entityRefs' as CollectionFilter['property'],\n values: entityRefs,\n };\n },\n});\n\nexport const collectionHasEntitiesConditionFactory = createConditionFactory(\n collectionHasEntities,\n);\n\nexport const isCollectionTagExpert = createPermissionRule({\n name: 'IS_COLLECTION_TAG_EXPERT',\n description: 'Allows if collection has tags the user is expert of',\n resourceRef: collectionPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z\n .string()\n .describe('User ID to match on the tag expert')\n .optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within tag expert'),\n }),\n apply: (resource: Collection, { userRef, claims }) => {\n return Boolean(\n resource?.experts?.some(e => e === userRef || claims?.includes(e)),\n );\n },\n toQuery: ({ claims = [], userRef }) => {\n return {\n property: 'tag.experts' as CollectionFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const collectionTagExpertConditionFactory = createConditionFactory(\n isCollectionTagExpert,\n);\n\nexport const collectionRules = {\n isCollectionOwner,\n collectionHasTags,\n collectionHasEntities,\n isCollectionTagExpert,\n};\n\nexport const rules = {\n ...commentRules,\n ...answerRules,\n ...postRules,\n ...tagRules,\n ...collectionRules,\n};\n"],"names":["createPermissionRule","postPermissionResourceRef","z","createConditionFactory","answerPermissionResourceRef","commentPermissionResourceRef","tagPermissionResourceRef","collectionPermissionResourceRef"],"mappings":";;;;;;AAyBO,MAAM,eAAeA,yCAAqB,CAAA;AAAA,EAC/C,IAAM,EAAA,WAAA;AAAA,EACN,WAAa,EAAA,sDAAA;AAAA,EACb,WAAa,EAAAC,6CAAA;AAAA,EACb,YAAA,EAAcC,MAAE,MAAO,CAAA;AAAA,IACrB,SAASA,KAAE,CAAA,MAAA,GAAS,QAAS,CAAA,gCAAgC,EAAE,QAAS,EAAA;AAAA,IACxE,MAAA,EAAQA,KACL,CAAA,KAAA,CAAMA,KAAE,CAAA,MAAA,EAAQ,CAChB,CAAA,QAAA,EACA,CAAA,QAAA,CAA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O,mDAAA;AAAA,EACb,YAAA,EAAcL,MAAE,MAAO,CAAA;AAAA,IACrB,SAASA,KACN,CAAA,MAAA,GACA,QAAS,CAAA,oCAAoC,EAC7C,QAAS,EAAA;AAAA,IACZ,MAAA,EAAQA,KACL,CAAA,KAAA,CAAMA,KAAE,CAAA,MAAA,EAAQ,CAChB,CAAA,QAAA,EACA,CAAA,QAAA,CAAS,2DAA2D;AAAA,GACxE,CAAA;AAAA,EACD,OAAO,CAAC,QAAA,EAAsB,EAAE,OAAA,EAAS,QAAa,KAAA;AACpD,IAAO,OAAA,OAAA;AAAA,MACL,QAAA,EAAU,SAAS,IAAK,CAAA,CAAA,CAAA,KAAK,MAAM,OAAW,IAAA,MAAA,EAAQ,QAAS,CAAA,CAAC,CAAC;AAAA,KACnE;AAAA,GACF;AAAA,EACA,SAAS,CAAC,EAAE,SAAS,EAAC,EAAG,SAAc,KAAA;AACrC,IAAO,OAAA;AAAA,MACL,QAAU,EAAA,aAAA;AAAA,MACV,QAAQ,CAAC,OAAA,EAAS,GAAG,MAAM,CAAA,CAAE,OAAO,OAAO;AAAA,KAC7C;AAAA;AAEJ,CAAC;AAEM,MAAM,mCAAsC,GAAAC,2CAAA;AAAA,EACjD;AACF;AAEO,MAAM,eAAkB,GAAA;AAAA,EAC7B,iBAAA;AAAA,EACA,iBAAA;AAAA,EACA,qBAAA;AAAA,EACA;AACF;AAEO,MAAM,KAAQ,GAAA;AAAA,EACnB,GAAG,YAAA;AAAA,EACH,GAAG,WAAA;AAAA,EACH,GAAG,SAAA;AAAA,EACH,GAAG,QAAA;AAAA,EACH,GAAG;AACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"permissionRules.cjs.js","sources":["../src/permissionRules.ts"],"sourcesContent":["import {\n createConditionFactory,\n createPermissionRule,\n} from '@backstage/plugin-permission-node';\nimport { z } from 'zod';\nimport {\n Answer,\n AnswerFilter,\n Collection,\n CollectionFilter,\n Comment,\n CommentFilter,\n Post,\n PostFilter,\n TagFilter,\n TagResponse,\n} from '@drodil/backstage-plugin-qeta-common';\nimport {\n answerPermissionResourceRef,\n collectionPermissionResourceRef,\n commentPermissionResourceRef,\n postPermissionResourceRef,\n tagPermissionResourceRef,\n} from './permissionResources';\nimport { PermissionCriteria } from '@backstage/plugin-permission-common';\n\nexport const isPostAuthor = createPermissionRule({\n name: 'IS_AUTHOR',\n description: 'Should allow only if the post is created by the user',\n resourceRef: postPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z.string().describe('User ID to match on the author').optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within author'),\n }),\n apply: (resource: Post, { userRef, claims = [] }) => {\n return resource?.author === userRef || claims.includes(resource?.author);\n },\n toQuery: ({ userRef, claims = [] }) => {\n return {\n property: 'posts.author' as PostFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const postAuthorConditionFactory = createConditionFactory(isPostAuthor);\n\nexport const postHasTags = createPermissionRule({\n name: 'HAS_TAGS',\n description: 'Should allow only if the post has all the specific tags',\n resourceRef: postPermissionResourceRef,\n paramsSchema: z.object({\n tags: z.array(z.string()).describe('Tag to match the post'),\n }),\n apply: (resource: Post, { tags }) => {\n return tags.every(t => resource?.tags?.includes(t));\n },\n toQuery: ({ tags }) => {\n const filters: PermissionCriteria<PostFilter>[] = tags.map(e => ({\n property: 'tags' as PostFilter['property'],\n values: [e],\n }));\n\n return {\n allOf: filters,\n } as PermissionCriteria<PostFilter>;\n },\n});\n\nexport const postHasTagsConditionFactory = createConditionFactory(postHasTags);\n\nexport const postHasAnyTag = createPermissionRule({\n name: 'HAS_ANY_TAG',\n description: 'Should allow only if the post has any of the specific tags',\n resourceRef: postPermissionResourceRef,\n paramsSchema: z.object({\n tags: z.array(z.string()).describe('Tag to match the post'),\n }),\n apply: (resource: Post, { tags }) => {\n return tags.some(t => resource?.tags?.includes(t));\n },\n toQuery: ({ tags }) => {\n return {\n property: 'tags' as PostFilter['property'],\n values: tags,\n } as PermissionCriteria<PostFilter>;\n },\n});\n\nexport const postHasAnyTagConditionFactory =\n createConditionFactory(postHasAnyTag);\n\nexport const postHasEntities = createPermissionRule({\n name: 'HAS_ENTITIES',\n description: 'Should allow only if the post has all the specific entities',\n resourceRef: postPermissionResourceRef,\n paramsSchema: z.object({\n entityRefs: z.array(z.string()).describe('Entity refs to match the post'),\n }),\n apply: (resource: Post, { entityRefs }) => {\n return entityRefs.every(t => resource?.entities?.includes(t));\n },\n toQuery: ({ entityRefs }): PermissionCriteria<PostFilter> => {\n const filters: PermissionCriteria<PostFilter>[] = entityRefs.map(e => ({\n property: 'entityRefs' as PostFilter['property'],\n values: [e],\n }));\n\n return {\n allOf: filters,\n } as PermissionCriteria<PostFilter>;\n },\n});\n\nexport const postHasEntitiesConditionFactory =\n createConditionFactory(postHasEntities);\n\nexport const postHasAnyEntity = createPermissionRule({\n name: 'HAS_ANY_ENTITY',\n description: 'Should allow only if the post has any of the specific entities',\n resourceRef: postPermissionResourceRef,\n paramsSchema: z.object({\n entityRefs: z.array(z.string()).describe('Entity refs to match the post'),\n }),\n apply: (resource: Post, { entityRefs }) => {\n return entityRefs.some(t => resource?.entities?.includes(t));\n },\n toQuery: ({ entityRefs }): PermissionCriteria<PostFilter> => {\n return {\n property: 'entityRefs' as PostFilter['property'],\n values: entityRefs,\n } as PermissionCriteria<PostFilter>;\n },\n});\n\nexport const postHasAnyEntityConditionFactory =\n createConditionFactory(postHasAnyEntity);\n\nexport const postHasType = createPermissionRule({\n name: 'HAS_TYPE',\n description: 'Should allow only if the post has the specific type',\n resourceRef: postPermissionResourceRef,\n paramsSchema: z.object({\n type: z.string().describe('Type to match the post'),\n }),\n apply: (resource: Post, { type }) => {\n return resource?.type === type;\n },\n toQuery: ({ type }) => {\n return {\n property: 'posts.type' as PostFilter['property'],\n values: [type],\n };\n },\n});\n\nexport const postHasTypeConditionFactory = createConditionFactory(postHasType);\n\nexport const isPostTagExpert = createPermissionRule({\n name: 'IS_POST_TAG_EXPERT',\n description: 'Allows if post has tags the user is expert of',\n resourceRef: postPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z\n .string()\n .describe('User ID to match on the tag expert')\n .optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within tag expert'),\n }),\n apply: (resource: Post, { userRef, claims }) => {\n return Boolean(\n resource?.experts?.some(e => e === userRef || claims?.includes(e)),\n );\n },\n toQuery: ({ claims = [], userRef }) => {\n return {\n property: 'tag.experts' as PostFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const postTagExpertConditionFactory =\n createConditionFactory(isPostTagExpert);\n\nexport const postDoesNotHaveTags = createPermissionRule({\n name: 'DOES_NOT_HAVE_TAGS',\n description:\n 'Should allow only if the post does not have any of the specific tags',\n resourceRef: postPermissionResourceRef,\n paramsSchema: z.object({\n tags: z.array(z.string()).describe('Tags that should not be on the post'),\n }),\n apply: (resource: Post, { tags }) => {\n return !tags.some(t => resource?.tags?.includes(t));\n },\n toQuery: ({ tags }) => {\n return {\n not: {\n property: 'tags' as PostFilter['property'],\n values: tags,\n },\n } as PermissionCriteria<PostFilter>;\n },\n});\n\nexport const postDoesNotHaveTagsConditionFactory =\n createConditionFactory(postDoesNotHaveTags);\n\nexport const postDoesNotHaveEntities = createPermissionRule({\n name: 'DOES_NOT_HAVE_ENTITIES',\n description:\n 'Should allow only if the post does not have any of the specific entities',\n resourceRef: postPermissionResourceRef,\n paramsSchema: z.object({\n entityRefs: z\n .array(z.string())\n .describe('Entity refs that should not be on the post'),\n }),\n apply: (resource: Post, { entityRefs }) => {\n return !entityRefs.some(t => resource?.entities?.includes(t));\n },\n toQuery: ({ entityRefs }): PermissionCriteria<PostFilter> => {\n return {\n not: {\n property: 'entityRefs' as PostFilter['property'],\n values: entityRefs,\n },\n } as PermissionCriteria<PostFilter>;\n },\n});\n\nexport const postDoesNotHaveEntitiesConditionFactory = createConditionFactory(\n postDoesNotHaveEntities,\n);\n\nexport const postRules = {\n isPostAuthor,\n postHasTags,\n postHasAnyTag,\n postHasEntities,\n postHasAnyEntity,\n postHasType,\n isPostTagExpert,\n postDoesNotHaveTags,\n postDoesNotHaveEntities,\n};\n\nexport const isAnswerAuthor = createPermissionRule({\n name: 'IS_AUTHOR',\n description: 'Should allow only if the answer is created by the user',\n resourceRef: answerPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z.string().describe('User ID to match on the author').optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within author'),\n }),\n apply: (resource: Answer, { userRef, claims = [] }) => {\n return resource?.author === userRef || claims.includes(resource?.author);\n },\n toQuery: ({ userRef, claims = [] }) => {\n return {\n property: 'answers.author' as AnswerFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const answerAuthorConditionFactory =\n createConditionFactory(isAnswerAuthor);\n\nexport const answerQuestionHasTags = createPermissionRule({\n name: 'HAS_TAGS',\n description:\n 'Should allow only if the answers question has all the specific tags',\n resourceRef: answerPermissionResourceRef,\n paramsSchema: z.object({\n tags: z.array(z.string()).describe('Tag to match the question'),\n }),\n apply: (resource: Answer, { tags }) => {\n return tags.every(t => resource?.post?.tags?.includes(t));\n },\n toQuery: ({ tags }) => {\n const filters: PermissionCriteria<AnswerFilter>[] = tags.map(e => ({\n property: 'tags' as AnswerFilter['property'],\n values: [e],\n }));\n\n return {\n allOf: filters,\n } as PermissionCriteria<AnswerFilter>;\n },\n});\n\nexport const answerQuestionTagsConditionFactory = createConditionFactory(\n answerQuestionHasTags,\n);\n\nexport const answerQuestionHasAnyTag = createPermissionRule({\n name: 'HAS_ANY_TAG',\n description:\n 'Should allow only if the answers question has any of the specific tags',\n resourceRef: answerPermissionResourceRef,\n paramsSchema: z.object({\n tags: z.array(z.string()).describe('Tag to match the question'),\n }),\n apply: (resource: Answer, { tags }) => {\n return tags.some(t => resource?.post?.tags?.includes(t));\n },\n toQuery: ({ tags }) => {\n return {\n property: 'tags' as AnswerFilter['property'],\n values: tags,\n } as PermissionCriteria<AnswerFilter>;\n },\n});\n\nexport const answerQuestionAnyTagConditionFactory = createConditionFactory(\n answerQuestionHasAnyTag,\n);\n\nexport const answerQuestionHasEntityRefs = createPermissionRule({\n name: 'HAS_ENTITIES',\n description:\n 'Should allow only if the answers question has all the specific entities',\n resourceRef: answerPermissionResourceRef,\n paramsSchema: z.object({\n entityRefs: z.array(z.string()).describe('Tag to match the question'),\n }),\n apply: (resource: Answer, { entityRefs }) => {\n return entityRefs.every(t => resource?.post?.entities?.includes(t));\n },\n toQuery: ({ entityRefs }) => {\n const filters: PermissionCriteria<AnswerFilter>[] = entityRefs.map(e => ({\n property: 'entityRefs' as AnswerFilter['property'],\n values: [e],\n }));\n\n return {\n allOf: filters,\n } as PermissionCriteria<AnswerFilter>;\n },\n});\n\nexport const answerQuestionEntitiesConditionFactory = createConditionFactory(\n answerQuestionHasEntityRefs,\n);\n\nexport const answerQuestionHasAnyEntityRefs = createPermissionRule({\n name: 'HAS_ANY_ENTITIES',\n description:\n 'Should allow only if the answers question has any of the specific entities',\n resourceRef: answerPermissionResourceRef,\n paramsSchema: z.object({\n entityRefs: z.array(z.string()).describe('Tag to match the question'),\n }),\n apply: (resource: Answer, { entityRefs }) => {\n return entityRefs.some(t => resource?.post?.entities?.includes(t));\n },\n toQuery: ({ entityRefs }) => {\n return {\n property: 'entityRefs' as AnswerFilter['property'],\n values: entityRefs,\n } as PermissionCriteria<AnswerFilter>;\n },\n});\n\nexport const answerQuestionHasAnyEntitiesConditionFactory =\n createConditionFactory(answerQuestionHasEntityRefs);\n\nexport const isAnswerTagExpert = createPermissionRule({\n name: 'IS_ANSWER_TAG_EXPERT',\n description: 'Allows if answers post has tags the user is expert of',\n resourceRef: answerPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z\n .string()\n .describe('User ID to match on the tag expert')\n .optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within tag expert'),\n }),\n apply: (resource: Answer, { userRef, claims }) => {\n return Boolean(\n resource?.experts?.some(e => e === userRef || claims?.includes(e)),\n );\n },\n toQuery: ({ claims = [], userRef }) => {\n return {\n property: 'tag.experts' as AnswerFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const answerTagExpertConditionFactory =\n createConditionFactory(isAnswerTagExpert);\n\nexport const answerQuestionDoesNotHaveTags = createPermissionRule({\n name: 'DOES_NOT_HAVE_TAGS',\n description:\n 'Should allow only if the answers question does not have any of the specific tags',\n resourceRef: answerPermissionResourceRef,\n paramsSchema: z.object({\n tags: z\n .array(z.string())\n .describe('Tags that should not be on the question'),\n }),\n apply: (resource: Answer, { tags }) => {\n return !tags.some(t => resource?.post?.tags?.includes(t));\n },\n toQuery: ({ tags }) => {\n return {\n not: {\n property: 'tags' as AnswerFilter['property'],\n values: tags,\n },\n } as PermissionCriteria<AnswerFilter>;\n },\n});\n\nexport const answerQuestionDoesNotHaveTagsConditionFactory =\n createConditionFactory(answerQuestionDoesNotHaveTags);\n\nexport const answerQuestionDoesNotHaveEntityRefs = createPermissionRule({\n name: 'DOES_NOT_HAVE_ENTITIES',\n description:\n 'Should allow only if the answers question does not have any of the specific entities',\n resourceRef: answerPermissionResourceRef,\n paramsSchema: z.object({\n entityRefs: z\n .array(z.string())\n .describe('Entity refs that should not be on the question'),\n }),\n apply: (resource: Answer, { entityRefs }) => {\n return !entityRefs.some(t => resource?.post?.entities?.includes(t));\n },\n toQuery: ({ entityRefs }) => {\n return {\n not: {\n property: 'entityRefs' as AnswerFilter['property'],\n values: entityRefs,\n },\n } as PermissionCriteria<AnswerFilter>;\n },\n});\n\nexport const answerQuestionDoesNotHaveEntitiesConditionFactory =\n createConditionFactory(answerQuestionDoesNotHaveEntityRefs);\n\nexport const answerRules = {\n isAnswerAuthor,\n answerQuestionHasTags,\n answerQuestionHasAnyTag,\n answerQuestionHasEntityRefs,\n answerQuestionHasAnyEntityRefs,\n isAnswerTagExpert,\n answerQuestionDoesNotHaveTags,\n answerQuestionDoesNotHaveEntityRefs,\n};\n\nexport const isCommentAuthor = createPermissionRule({\n name: 'IS_AUTHOR',\n description: 'Should allow only if the comment is created by the user',\n resourceRef: commentPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z.string().describe('User ID to match on the author').optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within author'),\n }),\n apply: (resource: Comment, { userRef, claims = [] }) => {\n return resource?.author === userRef || claims.includes(resource?.author);\n },\n toQuery: ({ userRef, claims = [] }) => {\n return {\n property: 'comments.author' as CommentFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const commentAuthorConditionFactory =\n createConditionFactory(isCommentAuthor);\n\nexport const commentRules = { isCommentAuthor };\n\nexport const isTag = createPermissionRule({\n name: 'IS_TAG',\n description: 'Should allow only if the tag exists',\n resourceRef: tagPermissionResourceRef,\n paramsSchema: z.object({\n tag: z.string().describe('Tag to match the post'),\n }),\n apply: (resource: TagResponse, { tag }) => {\n return resource?.tag === tag;\n },\n toQuery: ({ tag }) => {\n return {\n property: 'tags.tag' as TagFilter['property'],\n values: [tag],\n };\n },\n});\n\nexport const tagConditionFactory = createConditionFactory(isTag);\n\nexport const isTagExpert = createPermissionRule({\n name: 'IS_TAG_EXPERT',\n description: 'Allows only if user is tag expert',\n resourceRef: tagPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z\n .string()\n .describe('User ID to match on the tag expert')\n .optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within tag expert'),\n }),\n apply: (resource: TagResponse, { userRef, claims }) => {\n return Boolean(\n resource?.experts?.some(e => e === userRef || claims?.includes(e)),\n );\n },\n toQuery: ({ claims = [], userRef }) => {\n return {\n property: 'tag.experts' as TagFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const tagExpertConditionFactory = createConditionFactory(isTagExpert);\n\nexport const tagRules = { isTag, isTagExpert };\n\nexport const isCollectionOwner = createPermissionRule({\n name: 'IS_OWNER',\n description: 'Should allow only if the collection is owned by the user',\n resourceRef: collectionPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z\n .string()\n .describe('User reference to match on the owner')\n .optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within owner'),\n }),\n apply: (resource: Collection, { userRef, claims = [] }) => {\n return resource?.owner === userRef || claims.includes(resource?.owner);\n },\n toQuery: ({ userRef, claims = [] }) => {\n return {\n property: 'collections.owner' as CollectionFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const collectionOwnerConditionFactory =\n createConditionFactory(isCollectionOwner);\n\nexport const collectionHasTags = createPermissionRule({\n name: 'HAS_TAGS',\n description:\n 'Should allow only if the posts in the collection have the specific tags',\n resourceRef: collectionPermissionResourceRef,\n paramsSchema: z.object({\n tags: z.array(z.string()).describe('Tag to match the collection'),\n }),\n apply: (resource: Collection, { tags }) => {\n return tags.every(t => resource?.tags?.includes(t));\n },\n toQuery: ({ tags }) => {\n const filters: PermissionCriteria<CollectionFilter>[] = tags.map(e => ({\n property: 'tags' as CollectionFilter['property'],\n values: [e],\n }));\n\n return {\n allOf: filters,\n } as PermissionCriteria<CollectionFilter>;\n },\n});\n\nexport const collectionHasTagsConditionFactory =\n createConditionFactory(collectionHasTags);\n\nexport const collectionHasAnyTag = createPermissionRule({\n name: 'HAS_ANY_TAG',\n description:\n 'Should allow only if the posts in the collection have some of the specific tags',\n resourceRef: collectionPermissionResourceRef,\n paramsSchema: z.object({\n tags: z.array(z.string()).describe('Tag to match the collection'),\n }),\n apply: (resource: Collection, { tags }) => {\n return tags.some(t => resource?.tags?.includes(t));\n },\n toQuery: ({ tags }) => {\n return {\n property: 'tags' as CollectionFilter['property'],\n values: tags,\n } as PermissionCriteria<CollectionFilter>;\n },\n});\n\nexport const collectionHasAnyTagConditionFactory =\n createConditionFactory(collectionHasAnyTag);\n\nexport const collectionHasEntities = createPermissionRule({\n name: 'HAS_ENTITIES',\n description:\n 'Should allow only if the posts in the collection have all the specific entities',\n resourceRef: collectionPermissionResourceRef,\n paramsSchema: z.object({\n entityRefs: z\n .array(z.string())\n .describe('Entity refs to match the collection'),\n }),\n apply: (resource: Collection, { entityRefs }) => {\n return entityRefs.every(t => resource?.entities?.includes(t));\n },\n toQuery: ({ entityRefs }) => {\n const filters: PermissionCriteria<CollectionFilter>[] = entityRefs.map(\n e => ({\n property: 'entityRefs' as CollectionFilter['property'],\n values: [e],\n }),\n );\n\n return {\n allOf: filters,\n } as PermissionCriteria<CollectionFilter>;\n },\n});\n\nexport const collectionHasEntitiesConditionFactory = createConditionFactory(\n collectionHasEntities,\n);\n\nexport const collectionHasAnyEntity = createPermissionRule({\n name: 'HAS_ANY_ENTITY',\n description:\n 'Should allow only if the posts in the collection have some of the specific entities',\n resourceRef: collectionPermissionResourceRef,\n paramsSchema: z.object({\n entityRefs: z\n .array(z.string())\n .describe('Entity refs to match the collection'),\n }),\n apply: (resource: Collection, { entityRefs }) => {\n return entityRefs.some(t => resource?.entities?.includes(t));\n },\n toQuery: ({ entityRefs }) => {\n return {\n property: 'entityRefs' as CollectionFilter['property'],\n values: entityRefs,\n } as PermissionCriteria<CollectionFilter>;\n },\n});\n\nexport const collectionHasAnyEntityConditionFactory = createConditionFactory(\n collectionHasAnyEntity,\n);\n\nexport const isCollectionTagExpert = createPermissionRule({\n name: 'IS_COLLECTION_TAG_EXPERT',\n description: 'Allows if collection has tags the user is expert of',\n resourceRef: collectionPermissionResourceRef,\n paramsSchema: z.object({\n userRef: z\n .string()\n .describe('User ID to match on the tag expert')\n .optional(),\n claims: z\n .array(z.string())\n .optional()\n .describe('List of claims to match at least one on within tag expert'),\n }),\n apply: (resource: Collection, { userRef, claims }) => {\n return Boolean(\n resource?.experts?.some(e => e === userRef || claims?.includes(e)),\n );\n },\n toQuery: ({ claims = [], userRef }) => {\n return {\n property: 'tag.experts' as CollectionFilter['property'],\n values: [userRef, ...claims].filter(Boolean),\n };\n },\n});\n\nexport const collectionTagExpertConditionFactory = createConditionFactory(\n isCollectionTagExpert,\n);\n\nexport const collectionDoesNotHaveTags = createPermissionRule({\n name: 'DOES_NOT_HAVE_TAGS',\n description:\n 'Should allow only if the posts in the collection do not have any of the specific tags',\n resourceRef: collectionPermissionResourceRef,\n paramsSchema: z.object({\n tags: z\n .array(z.string())\n .describe('Tags that should not be in the collection'),\n }),\n apply: (resource: Collection, { tags }) => {\n return !tags.some(t => resource?.tags?.includes(t));\n },\n toQuery: ({ tags }) => {\n return {\n not: {\n property: 'tags' as CollectionFilter['property'],\n values: tags,\n },\n } as PermissionCriteria<CollectionFilter>;\n },\n});\n\nexport const collectionDoesNotHaveTagsConditionFactory = createConditionFactory(\n collectionDoesNotHaveTags,\n);\n\nexport const collectionDoesNotHaveEntities = createPermissionRule({\n name: 'DOES_NOT_HAVE_ENTITIES',\n description:\n 'Should allow only if the posts in the collection do not have any of the specific entities',\n resourceRef: collectionPermissionResourceRef,\n paramsSchema: z.object({\n entityRefs: z\n .array(z.string())\n .describe('Entity refs that should not be in the collection'),\n }),\n apply: (resource: Collection, { entityRefs }) => {\n return !entityRefs.some(t => resource?.entities?.includes(t));\n },\n toQuery: ({ entityRefs }) => {\n return {\n not: {\n property: 'entityRefs' as CollectionFilter['property'],\n values: entityRefs,\n },\n } as PermissionCriteria<CollectionFilter>;\n },\n});\n\nexport const collectionDoesNotHaveEntitiesConditionFactory =\n createConditionFactory(collectionDoesNotHaveEntities);\n\nexport const collectionRules = {\n isCollectionOwner,\n collectionHasTags,\n collectionHasAnyTag,\n collectionHasEntities,\n collectionHasAnyEntity,\n isCollectionTagExpert,\n collectionDoesNotHaveTags,\n collectionDoesNotHaveEntities,\n};\n\nexport const rules = {\n ...commentRules,\n ...answerRules,\n ...postRules,\n ...tagRules,\n ...collectionRules,\n};\n"],"names":["createPermissionRule","postPermissionResourceRef","z","createConditionFactory","answerPermissionResourceRef","commentPermissionResourceRef","tagPermissionResourceRef","collectionPermiss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AAA,CAAC,WAAW,IAAK,CAAA,CAAA,CAAA,KAAK,UAAU,QAAU,EAAA,QAAA,CAAS,CAAC,CAAC,CAAA;AAAA,GAC9D;AAAA,EACA,OAAS,EAAA,CAAC,EAAE,UAAA,EAAiB,KAAA;AAC3B,IAAO,OAAA;AAAA,MACL,GAAK,EAAA;AAAA,QACH,QAAU,EAAA,YAAA;AAAA,QACV,MAAQ,EAAA;AAAA;AACV,KACF;AAAA;AAEJ,CAAC;AAEY,MAAA,6CAAA,GACXC,4CAAuB,6BAA6B;AAE/C,MAAM,eAAkB,GAAA;AAAA,EAC7B,iBAAA;AAAA,EACA,iBAAA;AAAA,EACA,mBAAA;AAAA,EACA,qBAAA;AAAA,EACA,sBAAA;AAAA,EACA,qBAAA;AAAA,EACA,yBAAA;AAAA,EACA;AACF;AAEO,MAAM,KAAQ,GAAA;AAAA,EACnB,GAAG,YAAA;AAAA,EACH,GAAG,WAAA;AAAA,EACH,GAAG,SAAA;AAAA,EACH,GAAG,QAAA;AAAA,EACH,GAAG;AACL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "backstage.io",
8
8
  "node"
9
9
  ],
10
- "version": "3.47.2",
10
+ "version": "3.48.0",
11
11
  "main": "dist/index.cjs.js",
12
12
  "types": "dist/index.d.ts",
13
13
  "prepublishOnly": "yarn tsc && yarn build",
@@ -47,20 +47,20 @@
47
47
  "tsc": "tsc"
48
48
  },
49
49
  "devDependencies": {
50
- "@backstage/cli": "^0.34.5"
50
+ "@backstage/cli": "^0.35.0"
51
51
  },
52
52
  "files": [
53
53
  "dist"
54
54
  ],
55
55
  "dependencies": {
56
- "@backstage/backend-plugin-api": "^1.5.0",
56
+ "@backstage/backend-plugin-api": "^1.6.0",
57
57
  "@backstage/catalog-client": "^1.12.1",
58
58
  "@backstage/catalog-model": "^1.7.6",
59
59
  "@backstage/config": "^1.3.6",
60
- "@backstage/plugin-auth-node": "^0.6.9",
60
+ "@backstage/plugin-auth-node": "^0.6.10",
61
61
  "@backstage/plugin-permission-common": "^0.9.3",
62
- "@backstage/plugin-permission-node": "^0.10.6",
63
- "@drodil/backstage-plugin-qeta-common": "^3.47.2",
62
+ "@backstage/plugin-permission-node": "^0.10.7",
63
+ "@drodil/backstage-plugin-qeta-common": "^3.48.0",
64
64
  "zod": "^3.22.4"
65
65
  },
66
66
  "typesVersions": {