protected function LocalTaskAccessControlHandler::checkCreateAccess

File

translators/tmgmt_local/src/Entity/Controller/LocalTaskAccessControlHandler.php, line 56

Class

LocalTaskAccessControlHandler
Access control handler for the task 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'));
}