CodeHubOrg / codehub-mentorships

CodeHub Mentorship platform - built with Laravel and React
3 stars 0 forks source link

Katja/userroles #101

Closed katjad closed 4 years ago

katjad commented 4 years ago

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

  1. 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
  2. Run 'php artisan roles:bootstrap' to add some arbitrarily chosen roles and permissions. This could later go in the seeding.

usermanage

katjad commented 4 years ago

@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?