darryldecode / laravel-starter-kit

Laravel 7.0~ Starter Kit Powered by VueJS + Material Design(Vuetify)
https://laravel-starter-kit.darrylfernandez.com/
302 stars 132 forks source link

Suggetions: Using spatie laravel-permission instead of a custom build #15

Open twf-nikhila opened 5 years ago

twf-nikhila commented 5 years ago

Firstly, thanks for this awesome starter kit.

I think it will be really nice if instead of having a custom developed permission/group management spatie:laravel-permission package is used. https://github.com/spatie/laravel-permission

Advantages

Many developers are already familiar with this package, so adding I think adding it will certainly make this better.

Looking forward to hearing all of your opinions.

darryldecode commented 5 years ago

Thank you for your input. I know spatie library since it was still young but it was lacking some complex permission handling before versus the laravel sentry which this custom build was inspired from. But I can see the spatie has grown already and for sure it has already those complex permission that was missing before.

When I say complex permission handling, here is an example:

We give permission to be able to "add" and "delete" for GROUP A. Then we assign user 1 to GROUP A. So User 1 will have those permissions. Then now we have user 2 added to GROUP A as well, but we don't want user 2 to be able to "delete", so we assign a special permission to user 2 to deny him for delete permission.

This scenario was not supported in spatie way back year ago when it was young. but laravel sentry has this but sentry was not free. So I created my own custom built with the sentry capabilities.

To be honest, I don't have plans implementing a 3rd party permission handling since the goal for this is to be stand alone much as possible. And transitioning to using spatie will be a bit of work and I have a very hectic schedule at the moment. But I will consider looking into spatie again when I have the time.

Happy coding!

twf-nikhila commented 5 years ago

Thank you for the detailed response. Definitely transition to spatie Laravel permission will take time & effort, but will be worth it. I can send a PR if you want this to be included. Let me know.

Thank you

darryldecode commented 5 years ago

Hi @twf-nikhila , if you can do that w/o affecting much on how UX is presented with managing user, groups & permissions, that would be great! We will have two branches then, 1 for the spatie version. Thanks!

sparkEEdev commented 5 years ago

am actually interested in this, would love to help out with migration if anyone has started working on it