'App\Policies\ModelPolicy', ]; /** * Register any authentication / authorization services. * * @return void */ public function boot() { $this->registerPolicies(); if(config('pixelfed.oauth_enabled')) { Passport::routes(); Passport::tokensExpireIn(now()->addDays(15)); Passport::refreshTokensExpireIn(now()->addDays(30)); Passport::enableImplicitGrant(); Passport::setDefaultScope([ 'read', 'write', 'follow' ]); Passport::tokensCan([ 'read' => 'Full read access to your account', 'write' => 'Full write access to your account', 'follow' => 'Ability to follow other profiles' ]); } Gate::define('viewWebSocketsDashboard', function ($user = null) { return $user->is_admin; }); } }