You are here

public function RecordShortenViewsHandlerFieldHostname::render in Shorten URLs 8.2

Same name in this branch
  1. 8.2 modules/record_shorten/record_shorten_views_handler_field_hostname.inc \RecordShortenViewsHandlerFieldHostname::render()
  2. 8.2 modules/record_shorten/src/record_shorten_views_handler_field_hostname.php \Drupal\record_shorten\RecordShortenViewsHandlerFieldHostname::render()

File

modules/record_shorten/src/record_shorten_views_handler_field_hostname.php, line 27

Class

RecordShortenViewsHandlerFieldHostname
Restricts access to viewing the IP address field. There doesn't seem to be a standard for what permissions are necessary.

Namespace

Drupal\record_shorten

Code

public function render($values) {
  if (!\Drupal::currentUser()
    ->hasPermission('administer users') || !\Drupal::currentUser()
    ->hasPermission('access site reports')) {
    return;
  }
  return parent::render($values);
}