You are here

public function Role::access in Views (for Drupal 7) 8.3

Determine if the current user has access or not.

Parameters

Drupal\user\User $account: The user who wants to access this view.

Return value

TRUE Returns whether the user has access to the view.

Overrides AccessPluginBase::access

File

lib/Views/user/Plugin/views/access/Role.php, line 32
Definition of Views\user\Plugin\views\access\Role.

Class

Role
Access plugin that provides role-based access control.

Namespace

Views\user\Plugin\views\access

Code

public function access($account) {
  return views_check_roles(array_filter($this->options['role']), $account);
}