diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-26 00:11:07 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-26 00:11:07 +0300 |
commit | 1c61faf876f0da721dde9dc52fb28ab0e7330c6d (patch) | |
tree | b2c5330325d7cc53098dbcf53de1186f5b54bfba /app/controllers | |
parent | eccc2ec564f427460be5ffa6f9a6fb25f3f7fe6d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/oauth/authorizations_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/oauth/authorizations_controller.rb b/app/controllers/oauth/authorizations_controller.rb index a541e7e703f..9d85ec081d7 100644 --- a/app/controllers/oauth/authorizations_controller.rb +++ b/app/controllers/oauth/authorizations_controller.rb @@ -14,14 +14,18 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController # include the call to session.delete def new if pre_auth.authorizable? + if skip_authorization? || (matching_token? && pre_auth.client.application.confidential?) auth = authorization.authorize parsed_redirect_uri = URI.parse(auth.redirect_uri) session.delete(:user_return_to) + Authorizations::NotificationService.new(current_user).execute + render "doorkeeper/authorizations/redirect", locals: { redirect_uri: parsed_redirect_uri }, layout: false else redirect_uri = URI(authorization.authorize.redirect_uri) allow_redirect_uri_form_action(redirect_uri.scheme) + Authorizations::NotificationService.new(current_user).execute render "doorkeeper/authorizations/new" end |