private function RocketChatChannelBlock::canSeeDirectLinkButtons in Rocket.Chat 8.2
Parameters
\Drupal\group\Entity\Group $groupEntity:
\Drupal\group\GroupMembership $groupMember:
Return value
bool canAccess directLinks.
1 call to RocketChatChannelBlock::canSeeDirectLinkButtons()
- RocketChatChannelBlock::build in modules/
rocket_chat_group/ src/ Plugin/ Block/ RocketChatChannelBlock.php
File
- modules/
rocket_chat_group/ src/ Plugin/ Block/ RocketChatChannelBlock.php, line 264
Class
- RocketChatChannelBlock
- Provides an example block.
Namespace
Drupal\rocket_chat_group\Plugin\BlockCode
private function canSeeDirectLinkButtons(Group $groupEntity, GroupMembership $groupMember) {
return FALSE;
//REMINDER this does not work as intended needs more work before deployement.
/*
* if($groupMember->hasPermission('use rocketchat direct links')){
* return TRUE;
* }
* if($groupEntity->hasPermission('use rocketchat direct links', $this->account)){
* return TRUE;
* }
* if($this->account->hasPermission('use rocketchat direct links')){
* return TRUE;
* }
* return FALSE;
*/
}