I found this example really useful ;) https://gist.github.com/drawmyattention/8cb599ee5dc0af5f4246
Handling individual and group level permissions. Forum and other stuffs.
Hi,
Currently I'm trying to create a simple forum. There are a few forum categories. Some of the forum categories can only be posted to by teacher.
For now what I do is more of having a forum_categories_permissions table.
In it I specify which roles_id can hang out at which forum category.
Then in my code I do manual checkings. As how I do it for many other parts of my website to see if a user is a teacher or a student, or some other roles before deciding to allow or deny. Either based on their role, or if they are the creator of the item.
But I wonder if there is an easier or better way to manage this. I googled online and saw stuffs like DAC, ACL, RBAC and wonder if they could help me in this task.
Please or to participate in this conversation.