Commit 6e276ee2 authored by catch's avatar catch
Browse files

Issue #3179850 by claudiu.cristea: EntityTestAccessControlHandler allows...

Issue #3179850 by claudiu.cristea: EntityTestAccessControlHandler allows viewing an unpublished entity

(cherry picked from commit 7de47b04)
parent bf2317a7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -55,6 +55,9 @@ protected function checkAccess(EntityInterface $entity, $operation, AccountInter
          return AccessResult::allowedIfHasPermission($account, 'view test entity translations');
        }
      }
      if ($entity instanceof EntityPublishedInterface && !$entity->isPublished()) {
        return AccessResult::neutral('Unpublished entity');
      }
      return AccessResult::allowedIfHasPermission($account, 'view test entity');
    }
    elseif (in_array($operation, ['update', 'delete'])) {