1
I have a question about building a small project. A user has access to a department module, so far so good. My question is if the user needs to access another module of the same department. Login is being done automatically, I check the access to the department and module and I have a folder hierarchy for department with modules example.
I have a frontController that calls includes according to the department and module. The include home.php file was an example.
departamentoA/módulo1/home.php
departamentoA/módulo2/home.php
departamentoA/módulo3/home.php
departamentoB/módulo1/home.php
You must save the accesses to a SESSION, so you use Session to control what can and cannot be accessed. Your question is a little difficult to understand exactly the problem, but I imagine that’s it...
– Vítor André
@Vítorandré I’ll rephrase the question. I write in the Session the ids my problem and in case the user needs two modules as I call includes from different folders could not. Understood?
– Thalles Daniel
But when he accesses the other module he would necessarily have to leave the previous module
– Vítor André
exactly what it suggests to change the module in the login
– Thalles Daniel
I don’t think you can avoid going back to a redirect page to go to the new module. SESSION will only ensure that by clicking on the module’s choice menu you only display the valid options and that even if you try to circumvent the url it cannot access a denied module.
– Vítor André
@Vítorandré I will rethink the rules of business. So that the user is tied to only one module and if I need to use functions of another module I add to the user’s autal module by analyzing. Maybe my problem is in the business rules anyway.
– Thalles Daniel
This module you refer to will bring content to the same page? The guy could be on a page x and receive data from 3 modules if he had access to them? Is that it? If it is, it has to come in what situation you would bring these modules (clicking on something, sending a form, I don’t know). I didn’t understand the concept and purpose of modules.
– Vítor André
@Vítorandré I had an idea that if he changed sector he could access two modules now understood? And like it has a report module and a certified module, it would need to be accessing both, but the way I did it can’t.
– Thalles Daniel