You are here

function record_shorten_views_handler_field_hostname::render in Shorten URLs 8

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

File

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

Class

record_shorten_views_handler_field_hostname
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

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