You are here

public function TeamInvitationPermissionProvider::buildPermissions in Apigee Edge 8

Builds permissions for the given entity type.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.

Return value

array The permissions.

Overrides EntityPermissionProviderBase::buildPermissions

File

modules/apigee_edge_teams/src/Entity/TeamInvitationPermissionProvider.php, line 34

Class

TeamInvitationPermissionProvider
Provides permission for team_invitation.

Namespace

Drupal\apigee_edge_teams\Entity

Code

public function buildPermissions(EntityTypeInterface $entity_type) {
  $permissions['administer team_invitation'] = [
    'title' => $this
      ->t('Administer team invitation settings'),
    'provider' => 'apigee_edge_teams',
    'restrict access' => TRUE,
  ];
  $permissions['accept own team invitation'] = [
    'title' => $this
      ->t('Accept own team invitation'),
    'provider' => 'apigee_edge_teams',
  ];
  $permissions['accept any team invitation'] = [
    'title' => $this
      ->t('Accept any team invitation'),
    'provider' => 'apigee_edge_teams',
    'restrict access' => TRUE,
  ];
  $permissions['decline own team invitation'] = [
    'title' => $this
      ->t('Decline own team invitation'),
    'provider' => 'apigee_edge_teams',
  ];
  $permissions['decline any team invitation'] = [
    'title' => $this
      ->t('Decline any team invitation'),
    'provider' => 'apigee_edge_teams',
    'restrict access' => TRUE,
  ];
  return $permissions;
}