BladeOfGaladrial's avatar

Package to manage access control for my application

I want to design an access control system for my application and there are my requirements and constraints

There will be a super user account which has access to all the resources along with user CRUD, they can assign roles to user, they also can CRUD on roles in addition to assigning permission to those roles, where each permissions represents and action that can be performed on a particular resource ( adding a resource, deleting it, updating it, viewing it etc.) all can be controlled from admin panel. The user and restriction on these users will only be applied on admin panel. Now based on the permission that a user's role have I need to show them the right resources and also make sure that they cannot access routes which are not intended to be access by them.

My question is how can I design this system or if there is anything already available which can provide me the scaffolding and I can modify this, or will it be faster to just make it from scratch??

0 likes
4 replies
Rebwar's avatar

@BladeOfGaladrial Laravel Permission package is for managing roles and permissions in the database (e.g., “Can the user edit posts?”). It’s great for adding and managing permissions through a UI.

Laravel Policies are for specific rules (e.g., “Can the user edit this post?”). They work well for checking access to certain resources.

You can use both together: Laravel Permission package for general permissions and Policies for specific cases.

1 like
BladeOfGaladrial's avatar

@Rebwar That's good to know I will start looking for resources and explore on how can I integrate this to my application

Please or to participate in this conversation.