Update AuthServiceProvider

pull/1698/head^2
Daniel Supernault 6 years ago
parent 64e4c002e9
commit e359b6b98a
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -4,6 +4,7 @@ namespace App\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Laravel\Passport\Passport;
use Gate;
class AuthServiceProvider extends ServiceProvider
{
@ -32,14 +33,20 @@ class AuthServiceProvider extends ServiceProvider
Passport::enableImplicitGrant();
Passport::setDefaultScope([
'user:read',
'user:write'
'read',
'write',
'follow'
]);
Passport::tokensCan([
'user:read' => 'Read a users profile info and media',
'user:write' => 'This scope lets an app "Change your profile information"',
'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;
});
}
}

Loading…
Cancel
Save