You are here

protected function CertificateMappingAccessControlHandler::checkCreateAccess in Certificate 4.x

File

src/Access/CertificateMappingAccessControlHandler.php, line 11

Class

CertificateMappingAccessControlHandler

Namespace

Drupal\certificate\Access

Code

protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
  if ($account
    ->hasPermission('assign certificates')) {
    return \Drupal\Core\Access\AccessResultAllowed::allowed();
  }
  return parent::checkCreateAccess($account, $context, $entity_bundle);
}