Jump to content

Recommended Posts

Posted

(I am unsure of where to put this question, it might be both module and template related.)

I was looking at the module PageRenderIPRestriction and started wondering. Would it be possible to do something similar, but give a guest a user role based on IP (v6 preferrably)? Not for security measures, but for presentation.

I'm working on a mixed webpage with both intranet features and normal web page stuff. There's some parts of my templates I was thinking of restricting to a specific (or multiple) user role(s), namely employees.

Example:

If visitor's IP range is A-B, then he's an employee and should be able to view some extra buttons in a news article.

If visitor's IP range is else, no buttons are visibile.

Posted

I'm not sure if "login by ip" is a good way to do this, but you could always add the "employee" role on runtime to the guest user if the ip fits, just do not save the user afterwards.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...