Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin role #32

Closed
PrabuckiDominik opened this issue Aug 21, 2024 · 0 comments · Fixed by #33
Closed

Admin role #32

PrabuckiDominik opened this issue Aug 21, 2024 · 0 comments · Fixed by #33
Assignees

Comments

@PrabuckiDominik
Copy link
Collaborator

PrabuckiDominik commented Aug 21, 2024

It's necessary to split default user accounts from admin accounts.
As an admin, I want to login via the login page and be redirected to the admin dashboard.

@PrabuckiDominik PrabuckiDominik linked a pull request Aug 21, 2024 that will close this issue
PrabuckiDominik added a commit that referenced this issue Aug 27, 2024
* Add admin roles
Add IsAdminMiddleware
Add super admin and admin to the seeder
Add test dashboard for admin and user
Update tests that check role permission
Update routes

* Add User to setUp
Rename admin user to admin

* Apply suggestions from code review

Co-authored-by: Kamil Piech <[email protected]>

* Fix code style

* Implement Spatie framework

* Remove RolesEnum
Policies and Controller uses Spatie method

* Move role creation from feature tests to BaseTestCase

* Change message language to Polish

* Fix error message in AuthenticateSessionTest

* Refactor return statement

* Apply suggestions from code review

Co-authored-by: Aleksandra Kozubal <[email protected]>

* Add role and user seed to DatabaseSeeder
RoleSeeder checks if role already exists

* Improve RoleSeeder

* Refactor assignRole in tests

* Move roles to roles config

* Move assignRole to UserFactory

* Fix translation status

* Remove assignRole from RegisterUserController

* Remove double logout path in web
Move some logic to guest middleware group

* Add logout and profile button in user dashboard

* Remove unused Middleware - IsAdminMiddleware

* Apply suggestions from code review

Co-authored-by: Kamil Piech <[email protected]>

* Change assignRole into syncRoles for admin roles

* Restore configure in UserFactory

* Update config/roles.php

Co-authored-by: Kamil Piech <[email protected]>

* Fix RoleSeeder

* Added missing saloonphp/pagination-plugin

---------

Co-authored-by: Kamil Piech <[email protected]>
Co-authored-by: Aleksandra Kozubal <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant