Enhance user role management and update Filament panel middleware

- Added new user roles: operator, operator_card, operator_loan, client, and currency_maintainer in ShieldSeeder.
- Included EnsureUserHasRole middleware in the Filament panel for improved access control.
This commit is contained in:
Mekan1206
2025-12-21 03:49:55 +05:00
parent b1630ea623
commit 94ad59ce24
3 changed files with 51 additions and 1 deletions

View File

@@ -3,6 +3,7 @@
namespace App\Providers\Filament;
use App\Http\Middleware\EnsureProfileIsFilled;
use App\Http\Middleware\EnsureUserHasRole;
use App\Livewire\UserProfileFields;
use App\Modules\BaseAuth\Middleware\RedirectIfUserPhoneIsUnVerfied;
use BezhanSalleh\FilamentShield\FilamentShieldPlugin;
@@ -73,11 +74,12 @@ class WorkPanelProvider extends PanelProvider
UserProfileFields::class,
]),
// FilamentUpload::make(),
FilamentUpload::make(),
])
->authMiddleware([
Authenticate::class,
EnsureProfileIsFilled::class,
EnsureUserHasRole::class,
])
->spa()
->databaseTransactions()