public function AssignToMeTask::access

File

translators/tmgmt_local/src/Plugin/Action/AssignToMeTask.php, line 54

Class

AssignToMeTask
Redirects to a task assign form.

Namespace

Drupal\tmgmt_local\Plugin\Action

Code

public function access($object, AccountInterface $account = NULL, $return_as_object = FALSE) {
  $result = AccessResult::allowedIfHasPermission($account, 'provide translation services');
  return $return_as_object ? $result : $result
    ->isAllowed();
}