定制 born-digital/ip_range_access 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

born-digital/ip_range_access

最新稳定版本:1.0.6

Composer 安装命令:

composer require born-digital/ip_range_access

包简介

Restricts access to an allowed list of IP addresses

README 文档

README

Introduction

Drupal 10 Module that provides a Context Condition that checks the user's IP address, and a Context Reaction that denies access to nodes and media. If the Reaction executes, it returns a 403 Access Denied response to the user (or optionally redirect them to a proxy to authenticate before accessing the resource).

This module's primary use case was to provide IP access control to Islandora content, but it can be used without Islandora.

Requirements

Installation

  1. Clone this repo into your Islandora's drupal/web/modules/contrib directory.
  2. Enable the module either under the "Admin > Extend" menu or by running drush en -y ip_range_access.

Configuration

The Condition and Reaction are independent of each other (Context FTW!) but if your intent is to block a user from accessing content based on their IP address, do the following:

  1. Create a Context and choose the "User's IP address" Condition.
  2. Enter the ranges or individual IP addresses from where access is prohibited.
  3. (Optional) Add additional Conditions ("Node has parent", "Node has term", "User role", etc.). You probably want to add the "User's Role" condition to make sure that administrators aren't blocked from accessing content.
  4. Choose the "Deny access to node or media" Reaction and check the box.
    • (Optional) Add the URL of a proxy, such as Ezproxy, to the reaction's configuration, e.g., https://proxy.example.com/login?url=.

Sponsors

This work was made possible via the generous contribution of Boston College.

Current maintainer

Contributing

Bug reports, improvements, feature requests, and PRs welcome. Before you open a pull request, please open an issue.

License

GPLv2

统计信息

  • 总下载量: 1.67k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2025-06-09