You are here

LtiToolProviderProvisionAccessController.php in LTI Tool Provider 2.x

File

modules/lti_tool_provider_provision/src/LtiToolProviderProvisionAccessController.php
View source
<?php

namespace Drupal\lti_tool_provider;

use Drupal\Core\Access\AccessResult;
use Drupal\Core\Entity\EntityAccessControlHandler;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Session\AccountInterface;
class LtiToolProviderProvisionAccessController extends EntityAccessControlHandler {

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

  /**
   * {@inheritdoc}
   */
  protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
    return AccessResult::allowedIfHasPermission($account, 'administer lti_tool_provider module');
  }

}