瀏覽代碼

Update AuthServiceProvider

Daniel Supernault 1 年之前
父節點
當前提交
7a7b4bc717
共有 1 個文件被更改,包括 6 次插入5 次删除
  1. 6 5
      app/Providers/AuthServiceProvider.php

+ 6 - 5
app/Providers/AuthServiceProvider.php

@@ -31,11 +31,6 @@ class AuthServiceProvider extends ServiceProvider
             if(config('instance.oauth.pat.enabled')) {
                 Passport::personalAccessClientId(config('instance.oauth.pat.id'));
             }
-            Passport::setDefaultScope([
-                'read',
-                'write',
-                'follow',
-            ]);
 
             Passport::tokensCan([
                 'read' => 'Full read access to your account',
@@ -45,6 +40,12 @@ class AuthServiceProvider extends ServiceProvider
                 'admin:write' => 'Modify all data on the server',
                 'push'  => 'Receive your push notifications'
             ]);
+
+            Passport::setDefaultScope([
+                'read',
+                'write',
+                'follow',
+            ]);
         }
 
         // Gate::define('viewWebSocketsDashboard', function ($user = null) {