From 1d12dae71b09c90abd1e4d6d8751390548b4b9ab Mon Sep 17 00:00:00 2001
From: Alexey Murz Korepov <MurzNN@gmail.com>
Date: Tue, 25 Oct 2022 15:07:02 +0000
Subject: [PATCH] Added view permissions to view label operation

---
 src/TermAccessControlHandler.php | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/TermAccessControlHandler.php b/src/TermAccessControlHandler.php
index 5cb0a6a..6b7cc49 100644
--- a/src/TermAccessControlHandler.php
+++ b/src/TermAccessControlHandler.php
@@ -94,9 +94,12 @@ class TermAccessControlHandler extends OriginalTermAccessControlHandler {
     }
     elseif ($operation === 'view label') {
       return $entity->isPublished() ? [
+        "view terms in {$entity->bundle()}",
+        "view any term",
         "view term names in {$entity->bundle()}",
         'view any term name',
       ] : [
+        "view unpublished terms in {$entity->bundle()}",
         "view unpublished term names in {$entity->bundle()}",
         'view any unpublished term name',
       ];
-- 
GitLab