Update AuthServiceProvider

pull/1698/head^2
Daniel Supernault 2019-09-13 19:55:24 -06:00
rodzic 64e4c002e9
commit e359b6b98a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 0DEF1C662C9033F7
1 zmienionych plików z 11 dodań i 4 usunięć

Wyświetl plik

@ -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;
});
}
}