That is, you can already select a role for a user, under '/admin/users/' and it is saved to the database.
I have not used the permissions to restrict access yet though. I tried to show only certain navigation items (in the InertiaServiceProvider), but this did not work properly, they disappear after a while even if the user has the permission. -- I need to familiarise myself more with how permissions are applied!
To add roles and permissions
Run 'composer install' on the app's root, or if using laradock, you can rebuild the workspace docker container (docker-compose build workspace). This is adding the laravel-permission package https://github.com/spatie/laravel-permission
Run 'php artisan roles:bootstrap' to add some arbitrarily chosen roles and permissions. This could later go in the seeding.
@fourstacks would it make sense to merge my previous PR in to make this one smaller (I've included my previous one here)? You could make a PR on the Admin DashboardController after that?
This is adding the beginning of user management.
That is, you can already select a role for a user, under '/admin/users/' and it is saved to the database.
I have not used the permissions to restrict access yet though. I tried to show only certain navigation items (in the InertiaServiceProvider), but this did not work properly, they disappear after a while even if the user has the permission. -- I need to familiarise myself more with how permissions are applied!
To add roles and permissions