public function access(AccountInterface $account, FlagInterface $flag, $entity_id) {
    if (in_array($flag->id(), $this->socialContentReport->getReportFlagTypes())) {
      // Make sure user is allowed to use the flag.
      if (!$account->hasPermission('flag ' . $flag->id())) {
        return AccessResult::forbidden();
      }

      $entity = $this->entityTypeManager->getStorage($flag->getFlaggableEntityTypeId())
        ->load($entity_id);

      $flagged = $flag->isFlagged($entity, $account);

      // If the user already flagged the content they aren't allowed to do it
      // again.
      return $flagged ? AccessResult::forbidden() : AccessResult::allowed();
    }

    return AccessResult::neutral();
  }