diff --git a/ProcessMaker/Providers/AuthServiceProvider.php b/ProcessMaker/Providers/AuthServiceProvider.php index 4f49c24d67..24a9489d1b 100644 --- a/ProcessMaker/Providers/AuthServiceProvider.php +++ b/ProcessMaker/Providers/AuthServiceProvider.php @@ -10,6 +10,7 @@ use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\Schema; use Illuminate\Support\Str; +use Laravel\Passport\Passport; use ProcessMaker\Models\AnonymousUser; use ProcessMaker\Models\Media; use ProcessMaker\Models\Notification; @@ -58,6 +59,8 @@ public function boot() { $this->registerPolicies(); + Passport::authorizationView('auth.oauth2.authorize'); + Gate::before(function ($user) { if ($user->is_administrator) { return true; diff --git a/resources/img/devlink-request.svg b/resources/img/devlink-request.svg new file mode 100644 index 0000000000..95a782b69d --- /dev/null +++ b/resources/img/devlink-request.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/views/auth/oauth2/authorize.blade.php b/resources/views/auth/oauth2/authorize.blade.php index a1156b8f87..57794ba468 100644 --- a/resources/views/auth/oauth2/authorize.blade.php +++ b/resources/views/auth/oauth2/authorize.blade.php @@ -1,52 +1,178 @@ - + - {{ __('ProcessMaker') }} Oauth2 Server - - - - - - - - - + + + -
-
- -
+ {{ config('app.name') }} - Authorization - -
- -
Authorization Server
-
-
-

-

{{$user->getFullName()}}

- The application {{$client->name}} is requesting access to your account. + + + + + + + @if($client->name === 'devlink') +
+
- -
-
-
- - -    - + @else +
+
+
+
+
+ Authorization Request +
+
+ +

{{ $client->name }} is requesting permission to access your account.

+ + + @if (count($scopes) > 0) +
+

This application will be able to:

+ +
    + @foreach ($scopes as $scope) +
  • {{ $scope->description }}
  • + @endforeach +
+
+ @endif + +
+ +
+ @csrf + + + + + +
+ + +
+ @csrf + @method('DELETE') + + + + + +
+
+
+
-
- - + @endif