chore: update document approval workflow and bug fixes

This commit is contained in:
2026-05-25 13:05:20 +08:00
parent d573c02893
commit 39a8e1d4cd
910 changed files with 49994 additions and 1010 deletions

View File

@@ -4,6 +4,8 @@ namespace App\Providers;
use Illuminate\Support\Facades\Vite;
use Illuminate\Support\ServiceProvider;
use App\Models\User;
use App\Observers\UserObserver;
class AppServiceProvider extends ServiceProvider
{
@@ -21,5 +23,11 @@ class AppServiceProvider extends ServiceProvider
public function boot(): void
{
Vite::prefetch(concurrency: 3);
User::observe(UserObserver::class);
// Implicitly grant all permissions to Super Admins
\Illuminate\Support\Facades\Gate::before(function ($user, $ability) {
return $user->hasRole('Super Admin') ? true : null;
});
}
}