You are here

public function RestrictIpPermissions::permissions in Restrict IP 8

Same name and namespace in other branches
  1. 8.2 src/Access/RestrictIpPermissions.php \Drupal\restrict_ip\Access\RestrictIpPermissions::permissions()
  2. 3.x src/Access/RestrictIpPermissions.php \Drupal\restrict_ip\Access\RestrictIpPermissions::permissions()

*

Overrides RestrictIpPermissionsInterface::permissions

1 string reference to 'RestrictIpPermissions::permissions'
restrict_ip.permissions.yml in ./restrict_ip.permissions.yml
restrict_ip.permissions.yml

File

src/Access/RestrictIpPermissions.php, line 10

Class

RestrictIpPermissions

Namespace

Drupal\restrict_ip\Access

Code

public function permissions() {
  $permissions = [];
  if (\Drupal::config('restrict_ip.settings')
    ->get('allow_role_bypass')) {
    $permissions['bypass ip restriction'] = [
      'title' => 'Bypass IP Restriction',
      'description' => 'Allows the user to access the site even if not in the IP whitelist',
    ];
  }
  return $permissions;
}