You are here

function CertificateMappingAccessControlHandler::checkAccess in Certificate 4.x

File

src/Access/CertificateMappingAccessControlHandler.php, line 19

Class

CertificateMappingAccessControlHandler

Namespace

Drupal\certificate\Access

Code

function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
  if ($account
    ->hasPermission('assign certificates')) {
    return \Drupal\Core\Access\AccessResultAllowed::allowed();
  }
  return parent::checkAccess($entity, $operation, $account);
}