You are here

public function OrgConnectionPermission::hasRolePermissions in RedHen CRM 8

Determine if the contact execute the operation on the subject entity.

Parameters

\Drupal\Core\Entity\EntityInterface $subject_entity: The entity that is being accessed.

string $operation: The operation that is being performed (view, update, delete, view label).

\Drupal\redhen_contact\Entity\Contact $contact: The Redhen contact object.

Return value

bool True is access is allowed, false if neutral.

Overrides ConnectionPermissionBase::hasRolePermissions

File

modules/redhen_connection/src/Plugin/ConnectionPermission/OrgConnectionPermission.php, line 34

Class

OrgConnectionPermission
Provides permission for access to connected redhen_orgs.

Namespace

Drupal\redhen_connection\Plugin\ConnectionPermission

Code

public function hasRolePermissions(EntityInterface $subject_entity, $operation, Contact $contact) {
  return $this->redhenConnectionConnections
    ->checkConnectionPermission($contact, $subject_entity, $operation, $this
    ->getPermissionKey());
}