protected function JobAccessControlHandler::checkCreateAccess

File

src/Entity/Controller/JobAccessControlHandler.php, line 56

Class

JobAccessControlHandler
Access control handler for the job entity.

Namespace

Drupal\tmgmt\Entity\Controller

Code

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