/**
  * Check if the user is allowed to reach the step.
  *
  * @param  ModelInterface        $model
  * @param  Step                  $step
  * @throws AccessDeniedException
  */
 protected function checkCredentials(ModelInterface $model, Step $step)
 {
     $roles = $step->getRoles();
     if (!empty($roles) && !$this->authorizationChecker->isGranted($roles, $model->getWorkflowObject())) {
         throw new AccessDeniedException($step->getName());
     }
 }