2

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 1

3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.