Commit 0eb0d45a authored by JamesK's avatar JamesK Committed by Crell

Issue #2700099 by JamesK: InlineEditingDisabler::entityViewAlter() doesn't...

Issue #2700099 by JamesK: InlineEditingDisabler::entityViewAlter() doesn't check if moderation is enabled
parent 1eca79fc
......@@ -31,7 +31,7 @@ class InlineEditingDisabler {
* Implements hook_entity_view_alter().
*/
public function entityViewAlter(&$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
if ($entity->getEntityType()->isRevisionable() && !$this->moderationInfo->isLatestRevision($entity)) {
if ($this->moderationInfo->isModeratableEntity($entity) && !$this->moderationInfo->isLatestRevision($entity)) {
// Hide quickedit, because its super confusing for the user to not edit the
// live revision.
unset($build['#attributes']['data-quickedit-entity-id']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment