I’m currently working on permissions for a new project where there can be multiple users and roles and multiple pages or items that have different permissions. Throughout the years I have seen many many different implementations but I’m not sure I can think of one that is really great.
Starting with one of the worst, some just handle permissions by editing the database directly which is terrible in my opinion.
table showing user id, project id and then several columns that give permission to different areas of the application.
A better implementation is a grid like this where you have roles on one axis and the different areas of the application on the other axis.
roles are at the top going across with features in a left column. the other columns are then filled with green checkmarks or red x’s depending on if a permission is allowed or not.
The above grid is sometimes further extended to also show individual users or it may be possible to modify users to have certain permissions that differ from the role. However, this table can get huge if you have hundreds of roles and features and for me I want whatever I do to be future proof.
You could also have roles in its own table and clicking a role lets you edit the features that role has permissions for but it lacks the overview which the above grid has.
Do you have any good examples of applications that handle roles and permissions really well?