code: public function permissions() {
      $permissions = [];
      foreach ($this->entityTypeManager->getStorage('taxonomy_vocabulary')->loadMultiple() as $vocabulary) {
        $permissions += [
          'view published terms in ' . $vocabulary->id() => [
            'title' => $this->t('View published terms in %vocabulary', ['%vocabulary' => $vocabulary->label()]),
          ],
          'view unpublished terms in ' . $vocabulary->id() => [
            'title' => $this->t('View unpublished terms in %vocabulary', ['%vocabulary' => $vocabulary->label()]),
          ],
        ];
      }
      return $permissions;
    }
docs: Get taxonomy permissions.
  
  @return array
  Permissions array.