Zizaco / entrust

Role-based Permissions for Laravel 5
MIT License
6.05k stars 1.29k forks source link

Manage end user defined permissions on the developing level in laravel #881

Open ahmadbadpey opened 6 years ago

ahmadbadpey commented 6 years ago

I'm working on a inventory system based On larvel 5.5 and I used Zizaco/entrust to manage Roles and permissions.

In that system each warehouse can have a warehouse type(or suppose as a role) for example technical , estate and etc.

Also each type can have some permissions for example transfer products to other warehouses , Unable to sell and etc.

Note that all warehouse types and their permissions define by an End user.

Now when a warehouse was created, it's type and permissions are determined too.

But we know to control access of other users that work on different types of warehouses we should use middleware like this :

'middleware' => ['ability:technical,transfer|unable_sell']

Means that a developer should be know what roles and permissions an end user is created while developing process is a separate task from end User operations.

I want in this system all things be dynamically. defining warehouse types, it's permissions and that each warehouse type what can do. but I do not know how can manage permissions defined in End User level.