You are here

public function CancelEnrollInviteController::access in Open Social 10.1.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_event/modules/social_event_invite/src/Controller/CancelEnrollInviteController.php \Drupal\social_event_invite\Controller\CancelEnrollInviteController::access()
  2. 10.3.x modules/social_features/social_event/modules/social_event_invite/src/Controller/CancelEnrollInviteController.php \Drupal\social_event_invite\Controller\CancelEnrollInviteController::access()
  3. 10.0.x modules/social_features/social_event/modules/social_event_invite/src/Controller/CancelEnrollInviteController.php \Drupal\social_event_invite\Controller\CancelEnrollInviteController::access()
  4. 10.2.x modules/social_features/social_event/modules/social_event_invite/src/Controller/CancelEnrollInviteController.php \Drupal\social_event_invite\Controller\CancelEnrollInviteController::access()

Checks access for a specific request.

Parameters

\Drupal\Core\Session\AccountInterface $account: Run access checks for this account.

Return value

\Drupal\Core\Access\AccessResultInterface The access result.

1 string reference to 'CancelEnrollInviteController::access'
social_event_invite.routing.yml in modules/social_features/social_event/modules/social_event_invite/social_event_invite.routing.yml
modules/social_features/social_event/modules/social_event_invite/social_event_invite.routing.yml
1 method overrides CancelEnrollInviteController::access()
UserEnrollInviteController::access in modules/social_features/social_event/modules/social_event_invite/src/Controller/UserEnrollInviteController.php
Checks access for a specific request.

File

modules/social_features/social_event/modules/social_event_invite/src/Controller/CancelEnrollInviteController.php, line 97

Class

CancelEnrollInviteController
Cancels a pending enrollment invite.

Namespace

Drupal\social_event_invite\Controller

Code

public function access(AccountInterface $account) {
  $hasPermissionIsOwnerOrOrganizer = social_event_manager_or_organizer();
  return AccessResult::allowedIf($hasPermissionIsOwnerOrOrganizer === TRUE);
}