IP Address based Role Access

82 views
Skip to first unread message

Syed

unread,
Feb 26, 2019, 4:48:53 AM2/26/19
to iDempiere
Hi Community,

Environment Details:
1. Server Hosted on Public Cloud
2. iDempiere 5.1
3. Ubuntu Server

I have a requirement to protect ERP System data from the employees (users) when they are working from Home or outside of company network. So only the limited access Roles will be available to enter the basic transactions with limited report access when they are outside of company network regardless of personal or company  laptop or mobile devices.

This can be achieved with the help of Session Audit since it has user's ip address. I know by modifying the core, I can achieve this scenario.
How can I achieve this scenario without modifying core?


Thanks in advances,

Kind regards,
Syed.




Nicolas Micoud

unread,
Feb 26, 2019, 7:01:09 AM2/26/19
to iDempiere
Hello,

I don't think you will be able to filter the Role list on login panel without touching core.

If I understand your need, you can have a plugin that will extends AbstractEventHandler and checks for IEventTopics.AFTER_LOGIN.
From there, you can check the IP and see if the selected role is appropriate.
If not, you call the addErrorMessage(event, String msg) method to forbid user to log in

Regards,

Nicolas

Syed

unread,
Feb 26, 2019, 10:09:25 AM2/26/19
to iDempiere
Thank you Nicolas.
EventHandler based approach is just enough for my need.
Reply all
Reply to author
Forward
0 new messages