You are here

WebformOptionsAccessControlHandler.php in Webform 8.5

Same filename and directory in other branches
  1. 6.x src/WebformOptionsAccessControlHandler.php

Namespace

Drupal\webform

File

src/WebformOptionsAccessControlHandler.php
View source
<?php

namespace Drupal\webform;

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 options entity type.
 *
 * @see \Drupal\webform\Entity\WebformOptions.
 */
class WebformOptionsAccessControlHandler extends EntityAccessControlHandler {

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

}

Classes

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