summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wortschack <mwortschack@gitlab.com>2018-09-10 19:45:33 +0200
committerMartin Wortschack <mwortschack@gitlab.com>2018-09-10 19:45:33 +0200
commitbfd2181310097f5c0a92a43ffc2b7b9540b96ad3 (patch)
tree1842509efb7b85d0983906f153a3ff5b9863b7d6
parentbf5972e184c5f003b2db7d1aee63822b2b16cb21 (diff)
downloadgitlab-ce-bfd2181310097f5c0a92a43ffc2b7b9540b96ad3.tar.gz
use referer for redirect instead of hidden field param from partials
-rw-r--r--app/controllers/admin/application_settings_controller.rb2
-rw-r--r--app/views/admin/application_settings/_abuse.html.haml2
-rw-r--r--app/views/admin/application_settings/_account_and_limit.html.haml2
-rw-r--r--app/views/admin/application_settings/_background_jobs.html.haml2
-rw-r--r--app/views/admin/application_settings/_ci_cd.html.haml2
-rw-r--r--app/views/admin/application_settings/_email.html.haml2
-rw-r--r--app/views/admin/application_settings/_gitaly.html.haml2
-rw-r--r--app/views/admin/application_settings/_help_page.html.haml2
-rw-r--r--app/views/admin/application_settings/_influx.html.haml2
-rw-r--r--app/views/admin/application_settings/_ip_limits.html.haml2
-rw-r--r--app/views/admin/application_settings/_koding.html.haml2
-rw-r--r--app/views/admin/application_settings/_logging.html.haml2
-rw-r--r--app/views/admin/application_settings/_outbound.html.haml2
-rw-r--r--app/views/admin/application_settings/_pages.html.haml2
-rw-r--r--app/views/admin/application_settings/_performance.html.haml2
-rw-r--r--app/views/admin/application_settings/_performance_bar.html.haml2
-rw-r--r--app/views/admin/application_settings/_plantuml.html.haml2
-rw-r--r--app/views/admin/application_settings/_prometheus.html.haml2
-rw-r--r--app/views/admin/application_settings/_realtime.html.haml2
-rw-r--r--app/views/admin/application_settings/_registry.html.haml2
-rw-r--r--app/views/admin/application_settings/_repository_check.html.haml2
-rw-r--r--app/views/admin/application_settings/_repository_mirrors_form.html.haml2
-rw-r--r--app/views/admin/application_settings/_repository_storage.html.haml2
-rw-r--r--app/views/admin/application_settings/_signin.html.haml2
-rw-r--r--app/views/admin/application_settings/_signup.html.haml2
-rw-r--r--app/views/admin/application_settings/_spam.html.haml2
-rw-r--r--app/views/admin/application_settings/_terminal.html.haml2
-rw-r--r--app/views/admin/application_settings/_terms.html.haml2
-rw-r--r--app/views/admin/application_settings/_third_party_offers.html.haml2
-rw-r--r--app/views/admin/application_settings/_usage.html.haml2
-rw-r--r--app/views/admin/application_settings/_visibility_and_access.html.haml2
31 files changed, 1 insertions, 61 deletions
diff --git a/app/controllers/admin/application_settings_controller.rb b/app/controllers/admin/application_settings_controller.rb
index f9451decc19..e38241bd71a 100644
--- a/app/controllers/admin/application_settings_controller.rb
+++ b/app/controllers/admin/application_settings_controller.rb
@@ -9,7 +9,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
.new(@application_setting, current_user, application_setting_params)
.execute
- redirect_path = params[:redirect_path] ? params[:redirect_path].to_h : admin_application_settings_path
+ redirect_path = request.referer.presence ? request.referer : admin_application_settings_path
if successful
redirect_to redirect_path,
diff --git a/app/views/admin/application_settings/_abuse.html.haml b/app/views/admin/application_settings/_abuse.html.haml
index 4e2fd48406c..5f8bd799d23 100644
--- a/app/views/admin/application_settings/_abuse.html.haml
+++ b/app/views/admin/application_settings/_abuse.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-abuse-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, reporting_admin_application_settings_path)
-
%fieldset
.form-group
= f.label :admin_notification_email, 'Abuse reports notification email', class: 'label-bold'
diff --git a/app/views/admin/application_settings/_account_and_limit.html.haml b/app/views/admin/application_settings/_account_and_limit.html.haml
index 62db0a28ce7..9121e44d31b 100644
--- a/app/views/admin/application_settings/_account_and_limit.html.haml
+++ b/app/views/admin/application_settings/_account_and_limit.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-account-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, admin_application_settings_path)
-
%fieldset
.form-group
.form-check
diff --git a/app/views/admin/application_settings/_background_jobs.html.haml b/app/views/admin/application_settings/_background_jobs.html.haml
index 05ac629ef4b..7d1a64b645a 100644
--- a/app/views/admin/application_settings/_background_jobs.html.haml
+++ b/app/views/admin/application_settings/_background_jobs.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-background-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, preferences_admin_application_settings_path)
-
%fieldset
%p
These settings require a
diff --git a/app/views/admin/application_settings/_ci_cd.html.haml b/app/views/admin/application_settings/_ci_cd.html.haml
index 7df22c20ba2..97be658cd34 100644
--- a/app/views/admin/application_settings/_ci_cd.html.haml
+++ b/app/views/admin/application_settings/_ci_cd.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-ci-cd-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, ci_cd_admin_application_settings_path)
-
%fieldset
.form-group
.card.auto-devops-card
diff --git a/app/views/admin/application_settings/_email.html.haml b/app/views/admin/application_settings/_email.html.haml
index d57ec42ef9c..86339e61215 100644
--- a/app/views/admin/application_settings/_email.html.haml
+++ b/app/views/admin/application_settings/_email.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-email-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, preferences_admin_application_settings_path)
-
%fieldset
.form-group
.form-check
diff --git a/app/views/admin/application_settings/_gitaly.html.haml b/app/views/admin/application_settings/_gitaly.html.haml
index f18375b9627..f39d5709811 100644
--- a/app/views/admin/application_settings/_gitaly.html.haml
+++ b/app/views/admin/application_settings/_gitaly.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-gitaly-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, preferences_admin_application_settings_path)
-
%fieldset
.form-group
= f.label :gitaly_timeout_default, 'Default Timeout Period', class: 'label-bold'
diff --git a/app/views/admin/application_settings/_help_page.html.haml b/app/views/admin/application_settings/_help_page.html.haml
index 4c4cee53a83..70c8c74cc5d 100644
--- a/app/views/admin/application_settings/_help_page.html.haml
+++ b/app/views/admin/application_settings/_help_page.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-help-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, preferences_admin_application_settings_path)
-
%fieldset
.form-group
= f.label :help_page_text, class: 'label-bold'
diff --git a/app/views/admin/application_settings/_influx.html.haml b/app/views/admin/application_settings/_influx.html.haml
index 74b7e697a08..a1eeacd8290 100644
--- a/app/views/admin/application_settings/_influx.html.haml
+++ b/app/views/admin/application_settings/_influx.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-influx-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, metrics_and_profiling_admin_application_settings_path)
-
%fieldset
%p
Setup InfluxDB to measure a wide variety of statistics like the time spent
diff --git a/app/views/admin/application_settings/_ip_limits.html.haml b/app/views/admin/application_settings/_ip_limits.html.haml
index 1b88de9b184..5a5681830b8 100644
--- a/app/views/admin/application_settings/_ip_limits.html.haml
+++ b/app/views/admin/application_settings/_ip_limits.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-ip-limits-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, network_admin_application_settings_path)
-
%fieldset
.form-group
.form-check
diff --git a/app/views/admin/application_settings/_koding.html.haml b/app/views/admin/application_settings/_koding.html.haml
index f8f41337131..8b635b08abd 100644
--- a/app/views/admin/application_settings/_koding.html.haml
+++ b/app/views/admin/application_settings/_koding.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-koding-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, admin_application_settings_path)
-
%fieldset
.form-group
.form-check
diff --git a/app/views/admin/application_settings/_logging.html.haml b/app/views/admin/application_settings/_logging.html.haml
index 07b1d1d0086..41b787515b5 100644
--- a/app/views/admin/application_settings/_logging.html.haml
+++ b/app/views/admin/application_settings/_logging.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-logging-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, reporting_admin_application_settings_path)
-
%fieldset
.form-group
.form-check
diff --git a/app/views/admin/application_settings/_outbound.html.haml b/app/views/admin/application_settings/_outbound.html.haml
index 1a378799fd7..f4bfb5af385 100644
--- a/app/views/admin/application_settings/_outbound.html.haml
+++ b/app/views/admin/application_settings/_outbound.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-outbound-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, network_admin_application_settings_path)
-
%fieldset
.form-group
.form-check
diff --git a/app/views/admin/application_settings/_pages.html.haml b/app/views/admin/application_settings/_pages.html.haml
index d8d3a3bd2d7..ad5c8d4da22 100644
--- a/app/views/admin/application_settings/_pages.html.haml
+++ b/app/views/admin/application_settings/_pages.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-pages-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, preferences_admin_application_settings_path)
-
%fieldset
.form-group
= f.label :max_pages_size, 'Maximum size of pages (MB)', class: 'label-bold'
diff --git a/app/views/admin/application_settings/_performance.html.haml b/app/views/admin/application_settings/_performance.html.haml
index a944b1b8b11..e7076e7ed2f 100644
--- a/app/views/admin/application_settings/_performance.html.haml
+++ b/app/views/admin/application_settings/_performance.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-performance-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, network_admin_application_settings_path)
-
%fieldset
.form-group
.form-check
diff --git a/app/views/admin/application_settings/_performance_bar.html.haml b/app/views/admin/application_settings/_performance_bar.html.haml
index 9bc1ce3002d..44ac8d94764 100644
--- a/app/views/admin/application_settings/_performance_bar.html.haml
+++ b/app/views/admin/application_settings/_performance_bar.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-performance-bar-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, metrics_and_profiling_admin_application_settings_path)
-
%fieldset
.form-group
.form-check
diff --git a/app/views/admin/application_settings/_plantuml.html.haml b/app/views/admin/application_settings/_plantuml.html.haml
index c05ae72d233..5c2b7114426 100644
--- a/app/views/admin/application_settings/_plantuml.html.haml
+++ b/app/views/admin/application_settings/_plantuml.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-plantuml-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, integrations_admin_application_settings_path)
-
%fieldset
.form-group
.form-check
diff --git a/app/views/admin/application_settings/_prometheus.html.haml b/app/views/admin/application_settings/_prometheus.html.haml
index bf5eb3be415..a923568e52d 100644
--- a/app/views/admin/application_settings/_prometheus.html.haml
+++ b/app/views/admin/application_settings/_prometheus.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-prometheus-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, metrics_and_profiling_admin_application_settings_path)
-
%fieldset
%p
Enable a Prometheus metrics endpoint at
diff --git a/app/views/admin/application_settings/_realtime.html.haml b/app/views/admin/application_settings/_realtime.html.haml
index 73d889fa477..92f0c02eb6a 100644
--- a/app/views/admin/application_settings/_realtime.html.haml
+++ b/app/views/admin/application_settings/_realtime.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-realtime-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, preferences_admin_application_settings_path)
-
%fieldset
.form-group
= f.label :polling_interval_multiplier, 'Polling interval multiplier', class: 'label-bold'
diff --git a/app/views/admin/application_settings/_registry.html.haml b/app/views/admin/application_settings/_registry.html.haml
index bbfe0ff75e8..08c981db13f 100644
--- a/app/views/admin/application_settings/_registry.html.haml
+++ b/app/views/admin/application_settings/_registry.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-registry-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, ci_cd_admin_application_settings_path)
-
%fieldset
.form-group
= f.label :container_registry_token_expire_delay, 'Authorization token duration (minutes)', class: 'label-bold'
diff --git a/app/views/admin/application_settings/_repository_check.html.haml b/app/views/admin/application_settings/_repository_check.html.haml
index 46d35872db0..925e39bc0a3 100644
--- a/app/views/admin/application_settings/_repository_check.html.haml
+++ b/app/views/admin/application_settings/_repository_check.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-repository-check-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, repository_admin_application_settings_path)
-
%fieldset
.sub-section
%h4 Repository checks
diff --git a/app/views/admin/application_settings/_repository_mirrors_form.html.haml b/app/views/admin/application_settings/_repository_mirrors_form.html.haml
index c605c1ec2b3..c94f4c74820 100644
--- a/app/views/admin/application_settings/_repository_mirrors_form.html.haml
+++ b/app/views/admin/application_settings/_repository_mirrors_form.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-mirror-settings') do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, repository_admin_application_settings_path)
-
%fieldset
.form-group
= f.label :mirror_available, 'Enable mirror configuration', class: 'label-bold'
diff --git a/app/views/admin/application_settings/_repository_storage.html.haml b/app/views/admin/application_settings/_repository_storage.html.haml
index 3e89722a772..4523332493b 100644
--- a/app/views/admin/application_settings/_repository_storage.html.haml
+++ b/app/views/admin/application_settings/_repository_storage.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-repository-storage-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, repository_admin_application_settings_path)
-
%fieldset
.sub-section
.form-group
diff --git a/app/views/admin/application_settings/_signin.html.haml b/app/views/admin/application_settings/_signin.html.haml
index b2038faaf05..635a6751e5b 100644
--- a/app/views/admin/application_settings/_signin.html.haml
+++ b/app/views/admin/application_settings/_signin.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-signin-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, admin_application_settings_path)
-
%fieldset
.form-group
.form-check
diff --git a/app/views/admin/application_settings/_signup.html.haml b/app/views/admin/application_settings/_signup.html.haml
index 42d05d9e606..a0a58b811ee 100644
--- a/app/views/admin/application_settings/_signup.html.haml
+++ b/app/views/admin/application_settings/_signup.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-signup-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, admin_application_settings_path)
-
%fieldset
.form-group
.form-check
diff --git a/app/views/admin/application_settings/_spam.html.haml b/app/views/admin/application_settings/_spam.html.haml
index 867209fd0e1..54cda531580 100644
--- a/app/views/admin/application_settings/_spam.html.haml
+++ b/app/views/admin/application_settings/_spam.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-spam-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, reporting_admin_application_settings_path)
-
%fieldset
.form-group
.form-check
diff --git a/app/views/admin/application_settings/_terminal.html.haml b/app/views/admin/application_settings/_terminal.html.haml
index a941d57caef..49980e1e1a7 100644
--- a/app/views/admin/application_settings/_terminal.html.haml
+++ b/app/views/admin/application_settings/_terminal.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-terminal-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, admin_application_settings_path)
-
%fieldset
.form-group
= f.label :terminal_max_session_time, 'Max session time', class: 'label-bold'
diff --git a/app/views/admin/application_settings/_terms.html.haml b/app/views/admin/application_settings/_terms.html.haml
index ef3682ec8f0..ef58e9b1128 100644
--- a/app/views/admin/application_settings/_terms.html.haml
+++ b/app/views/admin/application_settings/_terms.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-terms-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, admin_application_settings_path)
-
%fieldset
.form-group
.form-check
diff --git a/app/views/admin/application_settings/_third_party_offers.html.haml b/app/views/admin/application_settings/_third_party_offers.html.haml
index b76fe93575d..fae5b0b965f 100644
--- a/app/views/admin/application_settings/_third_party_offers.html.haml
+++ b/app/views/admin/application_settings/_third_party_offers.html.haml
@@ -3,8 +3,6 @@
= form_for application_setting, url: admin_application_settings_path(anchor: 'js-third-party-offers-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(application_setting)
- = hidden_field(:redirect_path, integrations_admin_application_settings_path)
-
%fieldset
.form-group
.form-check
diff --git a/app/views/admin/application_settings/_usage.html.haml b/app/views/admin/application_settings/_usage.html.haml
index c2d1b4fb3ed..788595877ea 100644
--- a/app/views/admin/application_settings/_usage.html.haml
+++ b/app/views/admin/application_settings/_usage.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-usage-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, metrics_and_profiling_admin_application_settings_path)
-
%fieldset
.form-group.mb-2
.form-check
diff --git a/app/views/admin/application_settings/_visibility_and_access.html.haml b/app/views/admin/application_settings/_visibility_and_access.html.haml
index b397aab9de2..0725ffb7f6c 100644
--- a/app/views/admin/application_settings/_visibility_and_access.html.haml
+++ b/app/views/admin/application_settings/_visibility_and_access.html.haml
@@ -1,8 +1,6 @@
= form_for @application_setting, url: admin_application_settings_path(anchor: 'js-visibility-settings'), html: { class: 'fieldset-form' } do |f|
= form_errors(@application_setting)
- = hidden_field(:redirect_path, admin_application_settings_path)
-
%fieldset
.form-group
= f.label :default_branch_protection, class: 'label-bold'