You are here

WebformAccessTypeAccessControlHandler.php in Webform 8.5

File

modules/webform_access/src/WebformAccessTypeAccessControlHandler.php
View source
<?php

namespace Drupal\webform_access;

use Drupal\Core\Access\AccessResult;
use Drupal\Core\Entity\EntityAccessControlHandler;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Session\AccountInterface;

/**
 * Defines the access control handler for the webform access entity type.
 *
 * @see \Drupal\webform_access\Entity\WebformAccessType.
 */
class WebformAccessTypeAccessControlHandler extends EntityAccessControlHandler {

  /**
   * {@inheritdoc}
   */
  public function checkAccess(EntityInterface $entity, $operation, AccountInterface $account) {
    return AccessResult::allowedIfHasPermission($account, 'administer webform');
  }

}

Classes

Namesort descending Description
WebformAccessTypeAccessControlHandler Defines the access control handler for the webform access entity type.