Allow altering lists of paths used in the module

Created on 16 February 2025, about 2 months ago

Problem/Motivation

One useful (but not well documented) feature is allowing whitelisted IPs to be read from settings.php as well as the database.

It would be nice to provide a similar mechanism to add to or change the list of paths checked RestrictIpService::allowAccessByPermission() if, say, you have a third party module whose login path doesn't match what is hard coded.

Likewise, it would be nice to provide a mechanism to add to or change the list of paths generated by getWhitelistedPagePaths().

I'm sure there are other lists, but those are the two I'm finding most annoying at the moment.

Proposed resolution

Create relevant hooks to modify these lists programmatically (e.g. hook_restrict_ip_whitelisted_page_paths_alter, hook_restrict_ip_role_bypass_auth_allowed_paths_alter, etc).

Or, allow something in settings.php similar to $config['restrict_ip.settings']['ip_whitelist'].

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

5.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States miwayha

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024