- πΊπΈUnited States jastraat
Not a final solution but I did find that updating the checkAccess function in ScheduledTransitionsAccessControlHandler.php to the following means that the node/media/etc access permissions apply + rescheduling is possible without the "view all scheduled transitions" permission and just the rescheduling permission for that type.
protected function checkAccess(EntityInterface $entity, $operation, AccountInterface $account): AccessResultInterface { /** @var \Drupal\scheduled_transitions\Entity\ScheduledTransitionInterface $entity */ $access = parent::checkAccess($entity, $operation, $account); if ($access->isNeutral()) { $for = $entity->getEntity(); if ($for) { // Most entities don't have a matching permission for this; use update. if ($operation === ScheduledTransitionInterface::ENTITY_OPERATION_RESCHEDULE) { $entityOperation = 'update'; } else { $entityOperation = $operation; } // Combine with entity access. $access = $for->access($entityOperation, $account, TRUE); $entityType = $for->getEntityTypeId(); $bundle = $for->bundle(); switch($operation) { case 'view': $access->andIf( AccessResult::allowedIfHasPermission($account, ScheduledTransitionsPermissions::viewScheduledTransitionsPermission($entityType, $bundle)), ); break; case 'create': $access->andIf( AccessResult::allowedIfHasPermission($account, ScheduledTransitionsPermissions::addScheduledTransitionsPermission($entityType, $bundle)), ); break; case 'delete': case 'update': case 'reschedule': if ($entity->isProcessed()) { return AccessResult::forbiddenIf($entity->isProcessed(), \sprintf('Cannot `%s` when Scheduled Transition has been processed.', $operation))->addCacheableDependency($entity); } $access->andIf( AccessResult::allowedIfHasPermission($account, ScheduledTransitionsPermissions::rescheduleScheduledTransitionsPermission($entityType, $bundle)), ); break; } return $access; } } return $access; }
This could definitely be improved but provides a rough approach.