Files
investbrain/app/Providers/JetstreamServiceProvider.php
T

51 lines
1.1 KiB
PHP
Raw Normal View History

2024-08-01 13:53:10 -05:00
<?php
namespace App\Providers;
2024-11-14 02:23:22 -06:00
use Illuminate\Support\Arr;
use Laravel\Jetstream\Features;
2024-08-01 13:53:10 -05:00
use App\Actions\Jetstream\DeleteUser;
2024-11-14 02:23:22 -06:00
use Illuminate\Support\Facades\Config;
2024-08-01 13:53:10 -05:00
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);
2024-11-14 02:23:22 -06:00
if ( config('investbrain.self_hosted', false) ) {
Config::set(
'jetstream.features',
array_keys(Arr::except(array_values(config('jetstream.features')), Features::termsAndPrivacyPolicy()))
);
}
2024-08-01 13:53:10 -05:00
}
/**
* Configure the permissions that are available within the application.
*/
protected function configurePermissions(): void
{
2025-01-23 22:47:16 -06:00
Jetstream::defaultApiTokenPermissions([]);
Jetstream::permissions([]);
2024-08-01 13:53:10 -05:00
}
}