I will not go into details of the technology used, because the doubt is more in the best way to solve this situation. I have the following scenario:
- Multi-branch company;
- These affiliates have their collaborators;
- The system with the AngularJS front end and several backends in Java has been in production for almost 1 year.
When the employee logs in from anywhere, he has full access to the system, as it normally works. However, you will now have a change, if you log in to any other location, other than from within the company, it will only have access to some parts of the system.
What is the best way to check if the user is logging in from within the company and thus freeing full access or from any other location and thus only releasing partial access?