TeamInvitationPermissionProvider.php in Apigee Edge 8
File
modules/apigee_edge_teams/src/Entity/TeamInvitationPermissionProvider.php
View source
<?php
namespace Drupal\apigee_edge_teams\Entity;
use Drupal\Core\Entity\EntityTypeInterface;
use Drupal\entity\EntityPermissionProvider;
class TeamInvitationPermissionProvider extends EntityPermissionProvider {
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;
}
}