I have to provide access rights like edit, view, delete values in the database to the users dynamically in php, so that the super admin can change the privileges from the application itself.(no need to open the database and do it for each and every user).
1 Answer
When you create the database, you also create the users with the different rights you need, the you have a configuration file, where each user is mapped to a specific DB user, then when you make the connections, you are already using that user with the specific rights. You detect the user when they log in the application.
You may also change a bit the interface of the site to each user group, so you don't show controls or actions not related to that group.
1 Comment
Sergi Juanola
good answer, indeed. However, I would be talking about a db query instead of a configuration file in case the admin can create new users without worrying about editing that config file.