Wrong url generated.
user_access() -> Drupal::currentUser()->hasPermission().