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