Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-12-08 00:12:55 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-12-08 00:12:55 +0300
commit2cf4bdd0b060175c7058b395014b101fbe6214a3 (patch)
treef3aaeca09cc434632c8eb2c2998877c3f9a2e0d9 /app/helpers
parent1bdc6c89c32a7380a81598629b9ad05ba9a2a94f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/active_sessions_helper.rb2
-rw-r--r--app/helpers/ide_helper.rb15
-rw-r--r--app/helpers/nav/new_dropdown_helper.rb6
-rw-r--r--app/helpers/ssh_keys_helper.rb1
4 files changed, 18 insertions, 6 deletions
diff --git a/app/helpers/active_sessions_helper.rb b/app/helpers/active_sessions_helper.rb
index cfe0b747e78..48639526c31 100644
--- a/app/helpers/active_sessions_helper.rb
+++ b/app/helpers/active_sessions_helper.rb
@@ -24,6 +24,6 @@ module ActiveSessionsHelper
end
def revoke_session_path(active_session)
- profile_active_session_path(active_session.session_private_id)
+ user_settings_active_session_path(active_session.session_private_id)
end
end
diff --git a/app/helpers/ide_helper.rb b/app/helpers/ide_helper.rb
index f2d393f1f77..2ec11b8a9ed 100644
--- a/app/helpers/ide_helper.rb
+++ b/app/helpers/ide_helper.rb
@@ -52,6 +52,19 @@ module IdeHelper
{}
end
+ def new_ide_oauth_data
+ return {} unless ::Gitlab::WebIde::DefaultOauthApplication.feature_enabled?(current_user)
+ return {} unless ::Gitlab::WebIde::DefaultOauthApplication.oauth_application
+
+ client_id = ::Gitlab::WebIde::DefaultOauthApplication.oauth_application.uid
+ callback_url = ::Gitlab::WebIde::DefaultOauthApplication.oauth_callback_url
+
+ {
+ 'client-id' => client_id,
+ 'callback-url' => callback_url
+ }
+ end
+
def new_ide_data(project:)
{
'project-path' => project&.path_with_namespace,
@@ -59,7 +72,7 @@ module IdeHelper
# We will replace these placeholders in the FE
'ide-remote-path' => ide_remote_path(remote_host: ':remote_host', remote_path: ':remote_path'),
'editor-font' => new_ide_fonts.to_json
- }.merge(new_ide_code_suggestions_data)
+ }.merge(new_ide_code_suggestions_data).merge(new_ide_oauth_data)
end
def legacy_ide_data(project:)
diff --git a/app/helpers/nav/new_dropdown_helper.rb b/app/helpers/nav/new_dropdown_helper.rb
index 88e834b537a..af81e7832c8 100644
--- a/app/helpers/nav/new_dropdown_helper.rb
+++ b/app/helpers/nav/new_dropdown_helper.rb
@@ -116,7 +116,7 @@ module Nav
id: 'general_new_project',
title: _('New project/repository'),
href: new_project_path,
- data: { track_action: 'click_link_new_project', track_label: 'plus_menu_dropdown', track_property: 'navigation_top', testid: 'global_new_project_link' }
+ data: { track_action: 'click_link_new_project', track_label: 'plus_menu_dropdown', track_property: 'navigation_top', testid: 'global-new-project-link' }
)
)
end
@@ -127,7 +127,7 @@ module Nav
id: 'general_new_group',
title: _('New group'),
href: new_group_path,
- data: { track_action: 'click_link_new_group', track_label: 'plus_menu_dropdown', track_property: 'navigation_top', testid: 'global_new_group_link' }
+ data: { track_action: 'click_link_new_group', track_label: 'plus_menu_dropdown', track_property: 'navigation_top', testid: 'global-new-group-link' }
)
)
end
@@ -149,7 +149,7 @@ module Nav
id: 'general_new_snippet',
title: _('New snippet'),
href: new_snippet_path,
- data: { track_action: 'click_link_new_snippet_parent', track_label: 'plus_menu_dropdown', track_property: 'navigation_top', testid: 'global_new_snippet_link' }
+ data: { track_action: 'click_link_new_snippet_parent', track_label: 'plus_menu_dropdown', track_property: 'navigation_top', testid: 'global-new-snippet-link' }
)
)
end
diff --git a/app/helpers/ssh_keys_helper.rb b/app/helpers/ssh_keys_helper.rb
index 974a6869528..d640e7ffba9 100644
--- a/app/helpers/ssh_keys_helper.rb
+++ b/app/helpers/ssh_keys_helper.rb
@@ -33,7 +33,6 @@ module SshKeysHelper
title: title,
aria_label: title,
modal_attributes: {
- 'data-qa-selector': 'ssh_key_revoke_modal',
title: _('Are you sure you want to revoke this SSH key?'),
message: _('This action cannot be undone, and will permanently delete the %{key} SSH key. All commits signed using this SSH key will be marked as unverified.') % { key: key.title },
okVariant: 'danger',