简体   繁体   中英

Laravel Roles and Permissions Packages

I want to create roles and permissions like the following:

Each post has many users .

  1. Type A user can do everything (create, edit, update and delete) the post.

  2. Type B user can only create, edit and update the post.

  3. Type C user can only edit and update the post.

Will this work with the santigarcor/laratrust or spatie/laravel-permission packages? Those packages look very complicated.

If you are looking for a basic authorization feature, laravel's default gates and policies (as mentioned in the comments) would do the trick.

If are looking for features similar to that of page roles in Facebook pages , where you have different groups each with its own posts, and users who have different permissions in different groups, then take a look at the teams feature in the laratrust package.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM