diff --git a/core/modules/workflows/src/WorkflowAccessControlHandler.php b/core/modules/workflows/src/WorkflowAccessControlHandler.php index 63ad30f6d831d57a5bfe17fae4e2cdabd963b7ee..dac375e3351fdf3a98e56ebe411654f001238b04 100644 --- a/core/modules/workflows/src/WorkflowAccessControlHandler.php +++ b/core/modules/workflows/src/WorkflowAccessControlHandler.php @@ -76,8 +76,7 @@ protected function checkCreateAccess(AccountInterface $account, array $context, // Allow access if there is at least one workflow type. Since workflow types // are provided by modules this is cacheable until extensions change. return $admin_access - ->andIf(AccessResult::allowedIf($workflow_types_count > 0)) - ->addCacheTags(['workflow_type_plugins']); + ->andIf(AccessResult::allowedIf($workflow_types_count > 0)); } } diff --git a/core/modules/workflows/src/WorkflowTypeManager.php b/core/modules/workflows/src/WorkflowTypeManager.php index 60dfa7b7be647e486c7472f36b6c495f6d87c6de..457b36d5da0427121a05472082c71de922d92ff8 100644 --- a/core/modules/workflows/src/WorkflowTypeManager.php +++ b/core/modules/workflows/src/WorkflowTypeManager.php @@ -30,7 +30,7 @@ class WorkflowTypeManager extends DefaultPluginManager { public function __construct(\Traversable $namespaces, CacheBackendInterface $cache_backend, ModuleHandlerInterface $module_handler) { parent::__construct('Plugin/WorkflowType', $namespaces, $module_handler, WorkflowTypeInterface::class, WorkflowType::class); $this->alterInfo('workflow_type_info'); - $this->setCacheBackend($cache_backend, 'workflow_type_info', ['workflow_type_plugins']); + $this->setCacheBackend($cache_backend, 'workflow_type_info'); } } diff --git a/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php b/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php index 6111bac79ca510e2c0b1011e4b6c3e26d39a9ea3..1eff3d5a8f1028277a65d170b0a1c15bc183c9ab 100644 --- a/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php +++ b/core/modules/workflows/tests/src/Kernel/WorkflowAccessControlHandlerTest.php @@ -75,14 +75,12 @@ public function testCheckCreateAccess() { $this->assertEquals( AccessResult::neutral() ->addCacheContexts(['user.permissions']) - ->setReason("The 'administer workflows' permission is required.") - ->addCacheTags(['workflow_type_plugins']), + ->setReason("The 'administer workflows' permission is required."), $this->accessControlHandler->createAccess(NULL, $this->user, [], TRUE) ); $this->assertEquals( AccessResult::allowed() - ->addCacheContexts(['user.permissions']) - ->addCacheTags(['workflow_type_plugins']), + ->addCacheContexts(['user.permissions']), $this->accessControlHandler->createAccess(NULL, $this->adminUser, [], TRUE) ); @@ -92,8 +90,7 @@ public function testCheckCreateAccess() { $this->accessControlHandler->resetCache(); $this->assertEquals( AccessResult::neutral() - ->addCacheContexts(['user.permissions']) - ->addCacheTags(['workflow_type_plugins']), + ->addCacheContexts(['user.permissions']), $this->accessControlHandler->createAccess(NULL, $this->adminUser, [], TRUE) ); }