You are here

public function Access::forumPage in Forum Access 8

Access check for specific forum page.

File

src/ForumAccess/Access.php, line 36

Class

Access
Access checks for forum.

Namespace

Drupal\forum_access\ForumAccess

Code

public function forumPage(AccountInterface $account, TermInterface $taxonomy_term) {
  $view_access = forum_access_forum_check_view($account, $taxonomy_term
    ->id());
  if (!empty($view_access)) {
    return AccessResult::allowed();
  }
  return AccessResult::forbidden();
}