You are here

class RestrictIpPermissions in Restrict IP 8

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

Hierarchy

Expanded class hierarchy of RestrictIpPermissions

File

src/Access/RestrictIpPermissions.php, line 5

Namespace

Drupal\restrict_ip\Access
View source
class RestrictIpPermissions implements RestrictIpPermissionsInterface {

  /**
   * {@inheritdoc}
   */
  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;
  }

}

Members