protected function LocalTaskItemAccessController::checkCreateAccess

File

translators/tmgmt_local/src/Entity/Controller/LocalTaskItemAccessController.php, line 34

Class

LocalTaskItemAccessController
Access control handler for the task item entity.

Namespace

Drupal\tmgmt_local\Entity\Controller

Code

protected function checkCreateAccess(AccountInterface $account, array $context, $entity_bundle = NULL) {
  return AccessResult::allowedIfHasPermission($account, 'administer translation tasks')
    ->orIf(AccessResult::allowedIfHasPermission($account, 'administer tmgmt'));
}