You are here

public function SocialAlbumController::checkGroupAlbumsAccess in Open Social 10.1.x

Same name and namespace in other branches
  1. 10.3.x modules/social_features/social_album/src/Controller/SocialAlbumController.php \Drupal\social_album\Controller\SocialAlbumController::checkGroupAlbumsAccess()
  2. 10.0.x modules/social_features/social_album/src/Controller/SocialAlbumController.php \Drupal\social_album\Controller\SocialAlbumController::checkGroupAlbumsAccess()
  3. 10.2.x modules/social_features/social_album/src/Controller/SocialAlbumController.php \Drupal\social_album\Controller\SocialAlbumController::checkGroupAlbumsAccess()

Checks access to the group albums page.

Parameters

\Drupal\group\Entity\GroupInterface $group: The group object.

Return value

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

File

modules/social_features/social_album/src/Controller/SocialAlbumController.php, line 322

Class

SocialAlbumController
Returns responses for Album routes.

Namespace

Drupal\social_album\Controller

Code

public function checkGroupAlbumsAccess(GroupInterface $group) {
  $access = $this
    ->checkUserAlbumsAccess();
  return $access
    ->isForbidden() ? $access : $this
    ->checkGroupAccess($group);
}