protected function LocalTaskAccessControlHandler::checkFieldAccess

File

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

Class

LocalTaskAccessControlHandler
Access control handler for the task entity.

Namespace

Drupal\tmgmt_local\Entity\Controller

Code

protected function checkFieldAccess($operation, FieldDefinitionInterface $field_definition, AccountInterface $account, FieldItemListInterface $items = NULL) {
  if ($operation == 'edit') {
    return AccessResult::allowedIfHasPermissions($account, [
      'administer tmgmt',
      'administer translation tasks',
    ]);
  }
  return parent::checkFieldAccess($operation, $field_definition, $account, $items);
}