Skip to content
代码片段 群组 项目
未验证 提交 c28e029a 编辑于 作者: Aboobacker MK's avatar Aboobacker MK 提交者: GitLab
浏览文件

Merge branch 'tachyons-redirect-applications' into 'master'

Redirect oauth applications to user_settings

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/139251



Merged-by: default avatarAboobacker MK <akarakath@gitlab.com>
Approved-by: default avatarScott de Jonge <sdejonge@gitlab.com>
Approved-by: default avatarAndrew Evans <aevans@gitlab.com>
Approved-by: default avatarSmriti Garg <sgarg@gitlab.com>
Reviewed-by: default avatarAndrew Evans <aevans@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -19,7 +19,7 @@ def destroy
Doorkeeper::Application.revoke_tokens_and_grants_for(params[:id], current_resource_owner)
end
redirect_to applications_profile_url,
redirect_to user_settings_applications_url,
status: :found,
notice: I18n.t(:notice, scope: [:doorkeeper, :flash, :authorized_applications, :destroy])
end
......
......@@ -6,7 +6,7 @@
resource :profile, only: [:show, :update] do
member do
get :audit_log, to: redirect('-/user_settings/authentication_log')
get :applications, to: 'oauth/applications#index'
get :applications, to: redirect('-/user_settings/applications')
put :reset_incoming_email_token
put :reset_feed_token
......
......@@ -3,6 +3,7 @@
namespace :user_settings do
scope module: 'user_settings' do
get :authentication_log
get :applications, to: '/oauth/applications#index'
end
resources :active_sessions, only: [:index, :destroy]
end
......
......@@ -53,7 +53,7 @@ Refer to the [OAuth RFC](https://www.rfc-editor.org/rfc/rfc6749) to find out
how all those flows work and pick the right one for your use case.
Authorization code (with or without PKCE) flow requires `application` to be
registered first via the `/profile/applications` page in your user's account.
registered first via the `/user_settings/applications` page in your user's account.
During registration, by enabling proper scopes, you can limit the range of
resources which the `application` can access. Upon creation, you obtain the
`application` credentials: _Application ID_ and _Client Secret_. The _Client Secret_
......
......@@ -8,7 +8,7 @@ class ApplicationsMenu < ::Sidebars::Menu
override :link
def link
applications_profile_path
user_settings_applications_path
end
override :title
......
......@@ -4,7 +4,7 @@
RSpec.describe 'User manages applications', feature_category: :user_profile do
let_it_be(:user) { create(:user) }
let_it_be(:new_application_path) { applications_profile_path }
let_it_be(:new_application_path) { user_settings_applications_path }
let_it_be(:index_path) { oauth_applications_path }
before do
......
......@@ -4,7 +4,7 @@
RSpec.describe Sidebars::UserSettings::Menus::ApplicationsMenu, feature_category: :navigation do
it_behaves_like 'User settings menu',
link: '/-/profile/applications',
link: '/-/user_settings/applications',
title: _('Applications'),
icon: 'applications',
active_routes: { controller: 'oauth/applications' }
......
......@@ -13,4 +13,14 @@
get "/-/profile/audit_log"
expect(response).to redirect_to('/-/user_settings/authentication_log')
end
it "/-/profile/active_sessions" do
get "/-/profile/active_sessions"
expect(response).to redirect_to('/-/user_settings/active_sessions')
end
it "/-/profile/applications" do
get "/-/profile/applications"
expect(response).to redirect_to('/-/user_settings/applications')
end
end
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册