mjordan / ip_range_access

Drupal 10 Context module to control access to content based on user's IP address
GNU General Public License v2.0
1 stars 2 forks source link

Does Rules do what this module is designed to do? #6

Closed mjordan closed 5 months ago

mjordan commented 5 years ago

@dannylamb you said during the Islandora 8: The Next Release webinar that Rules can enforce an embargo based on IP address of the user. Can you clarify that?

dannylamb commented 5 years ago

@mjordan I haven't used it yet, but the first Rules action on this list bans by IP: https://www.drupal.org/docs/8/modules/d8-rules-essentials/actions

dannylamb commented 5 years ago

That said, your module is for Context and not Rules, so it's not the same. But Rules does integrate with the workflow module, so conceivably it could get wired in pretty easily.

mjordan commented 5 years ago

Right, so if Rules conditions (listed at https://www.drupal.org/docs/8/modules/d8-rules-essentials/conditions, there may be more from contrib modules, I assume) can do things like detect if the node is in a collection, has a term attached, if the user's role is allowed, etc. then my module is redundant. I tend to think in terms of Context (which I have used a lot) and not in terms of Rules (which I don't think I've ever used).

mjordan commented 5 years ago

One use case that SFU has is that we need to be able to reroute the user, based on their IP address, to our Ezproxy. In other words, if they user is on campus, don't embargo; if they are not on campus, route them to the proxy and require them to log in to access the resource.