mirror of
https://gh.wpcy.net/https://github.com/aspirepress/AspireCloud.git
synced 2026-05-31 00:04:27 +08:00
* feat: Changes required on existing files to setup Jetstream * feat: add the Inertia Home and Dashboard * feat: Add all required files and migrations to setup Jetstream * feat: Add the Sanctum middleware to the API endpoints - Added Sanctum to the API endpoints to requiere an API Key - Added a setting to control if the app should use authenticated API or not (see .env.example) - Fix redirection on API routes to the login page when a request was unauthenticated * feat: Users Management and Authication API Keys - Refactor existing tests to make authenticated request is enable - Hide the permissions setting on the UI, for now we only have a read-only API - Add tests to test authenticated and unauthenticated calls
46 lines
989 B
PHP
46 lines
989 B
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Actions\Jetstream\DeleteUser;
|
|
use Illuminate\Support\Facades\Vite;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Laravel\Jetstream\Jetstream;
|
|
|
|
class JetstreamServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Register any application services.
|
|
*/
|
|
public function register(): void
|
|
{
|
|
//
|
|
}
|
|
|
|
/**
|
|
* Bootstrap any application services.
|
|
*/
|
|
public function boot(): void
|
|
{
|
|
$this->configurePermissions();
|
|
|
|
Jetstream::deleteUsersUsing(DeleteUser::class);
|
|
|
|
Vite::prefetch(concurrency: 3);
|
|
}
|
|
|
|
/**
|
|
* Configure the permissions that are available within the application.
|
|
*/
|
|
protected function configurePermissions(): void
|
|
{
|
|
Jetstream::defaultApiTokenPermissions(['read']);
|
|
|
|
Jetstream::permissions([
|
|
// 'create',
|
|
'read',
|
|
// 'update',
|
|
// 'delete',
|
|
]);
|
|
}
|
|
}
|