@contentful/field-editor-reference 4.2.0 → 4.2.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,12 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [4.2.1](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.2.0...@contentful/field-editor-reference@4.2.1) (2022-03-29)
7
+
8
+ ### Bug Fixes
9
+
10
+ - allow linking assets on permission rule with tags ([#1085](https://github.com/contentful/field-editors/issues/1085)) ([d7465d0](https://github.com/contentful/field-editors/commit/d7465d05ecc2674c3e10c927c6f2f414adb5df04))
11
+
6
12
  # [4.2.0](https://github.com/contentful/field-editors/compare/@contentful/field-editor-reference@4.1.2...@contentful/field-editor-reference@4.2.0) (2022-03-02)
7
13
 
8
14
  ### Features
@@ -2314,7 +2314,7 @@ function useEditorPermissions(props) {
2314
2314
  switch (_context2.prev = _context2.next) {
2315
2315
  case 0:
2316
2316
  if (!(entityType === 'Asset')) {
2317
- _context2.next = 5;
2317
+ _context2.next = 8;
2318
2318
  break;
2319
2319
  }
2320
2320
 
@@ -2322,15 +2322,25 @@ function useEditorPermissions(props) {
2322
2322
  return canPerformAction('read', 'Asset');
2323
2323
 
2324
2324
  case 3:
2325
- canRead = _context2.sent;
2325
+ _context2.t0 = _context2.sent;
2326
+
2327
+ if (_context2.t0) {
2328
+ _context2.next = 6;
2329
+ break;
2330
+ }
2331
+
2332
+ _context2.t0 = true;
2333
+
2334
+ case 6:
2335
+ canRead = _context2.t0;
2326
2336
  setCanLinkEntity(canRead);
2327
2337
 
2328
- case 5:
2338
+ case 8:
2329
2339
  if (entityType === 'Entry') {
2330
2340
  setCanLinkEntity(readableContentTypes.length > 0);
2331
2341
  }
2332
2342
 
2333
- case 6:
2343
+ case 9:
2334
2344
  case "end":
2335
2345
  return _context2.stop();
2336
2346
  }