public function BBBMeetingAttendeeAccessCheck::access in BigBlueButton 8
File
- modules/
bbb_node/ src/ Access/ BBBMeetingAttendeeAccessCheck.php, line 50
Class
- BBBMeetingAttendeeAccessCheck
- Class BBBMeetingAttendeeAccessCheck.
Namespace
Drupal\bbb_node\AccessCode
public function access(RouteMatchInterface $route_match, AccountInterface $account) {
$node = $route_match
->getParameter('node');
if (!$node instanceof NodeInterface) {
$node = $this->nodeStorage
->load($node);
}
if ($this->nodeMeeting
->isTypeOf($node)) {
return AccessResult::forbidden();
}
if ($account
->hasPermission('bbb_node attend meetings') || $account
->hasPermission('administer big blue button')) {
return AccessResult::allowed();
}
return AccessResult::neutral();
}