class BBBMeetingAttendeeAccessCheck in BigBlueButton 8
Class BBBMeetingAttendeeAccessCheck.
@package Drupal\bbb\Access
Hierarchy
- class \Drupal\bbb_node\Access\BBBMeetingAttendeeAccessCheck implements AccessInterface
Expanded class hierarchy of BBBMeetingAttendeeAccessCheck
1 string reference to 'BBBMeetingAttendeeAccessCheck'
- bbb_node.services.yml in modules/
bbb_node/ bbb_node.services.yml - modules/bbb_node/bbb_node.services.yml
1 service uses BBBMeetingAttendeeAccessCheck
File
- modules/
bbb_node/ src/ Access/ BBBMeetingAttendeeAccessCheck.php, line 18
Namespace
Drupal\bbb_node\AccessView source
class BBBMeetingAttendeeAccessCheck implements AccessInterface {
/**
* Node based Meeting API.
*
* @var \Drupal\bbb_node\Service\NodeMeeting
*/
protected $nodeMeeting;
/**
* Node storage.
*
* @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $nodeStorage;
/**
* Constructs a BBBMeetingModeratorAccessCheck object.
*
* @param \Drupal\bbb_node\Service\NodeMeeting $node_meeting
* Node based Meeting API.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* Entity type manager.
*/
public function __construct(NodeMeeting $node_meeting, EntityTypeManagerInterface $entity_type_manager) {
$this->nodeMeeting = $node_meeting;
$this->nodeStorage = $entity_type_manager
->getStorage('node');
}
/**
* {@inheritdoc}
*/
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();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BBBMeetingAttendeeAccessCheck:: |
protected | property | Node based Meeting API. | |
BBBMeetingAttendeeAccessCheck:: |
protected | property | Node storage. | |
BBBMeetingAttendeeAccessCheck:: |
public | function | ||
BBBMeetingAttendeeAccessCheck:: |
public | function | Constructs a BBBMeetingModeratorAccessCheck object. |