Skip to content

Resolve "Allow Seat Link to be disabled through admin toggle"

Tyler Amos requested to merge 212375-seat-link-admin-toggle into master

What does this MR do?

This MR introduces a couple ways to disable the Seat Link feature:

  1. A configuration in gitlab.yml
  2. An admin toggle in the Metrics and Profiling section of Settings.

This is intended for customers that do not have the ability to make request from their instance back to GitLab. It provides a clear path to upgrade to %12.9.

Migration Output

Up

➜  gitlab git:(212375-seat-link-admin-toggle) ✗ rdm
== 20200325152327 AddSeatLinkEnabledToApplicationSettings: migrating ==========
-- transaction_open?()
   -> 0.0000s
-- execute("SET statement_timeout TO 0")
   -> 0.0002s
-- transaction()
-- add_column(:application_settings, :seat_link_enabled, :boolean, {:default=>nil})
   -> 0.0069s
-- change_column_default(:application_settings, :seat_link_enabled, true)
   -> 0.0284s
   -> 0.0362s
-- columns(:application_settings)
   -> 0.0232s
-- transaction_open?()
   -> 0.0000s
-- exec_query("SELECT COUNT(*) AS count FROM \"application_settings\"")
   -> 0.0009s
-- exec_query("SELECT \"application_settings\".\"id\" FROM \"application_settings\" ORDER BY \"application_settings\".\"id\" ASC LIMIT 1")
   -> 0.0004s
-- exec_query("SELECT \"application_settings\".\"id\" FROM \"application_settings\" WHERE \"application_settings\".\"id\" >= 1 ORDER BY \"application_settings\".\"id\" ASC LIMIT 1 OFFSET 1")
   -> 0.0003s
-- execute("UPDATE \"application_settings\" SET \"seat_link_enabled\" = TRUE WHERE \"application_settings\".\"id\" >= 1")
   -> 0.0011s
-- change_column_null(:application_settings, :seat_link_enabled, false)
   -> 0.0006s
-- execute("RESET ALL")
   -> 0.0002s
== 20200325152327 AddSeatLinkEnabledToApplicationSettings: migrated (0.0641s) =

Down

➜  gitlab git:(212375-seat-link-admin-toggle) ✗ rdr
== 20200325152327 AddSeatLinkEnabledToApplicationSettings: reverting ==========
-- remove_column(:application_settings, :seat_link_enabled)
   -> 0.0046s
== 20200325152327 AddSeatLinkEnabledToApplicationSettings: reverted (0.0047s) =

Screenshots

Admin Toggle Screen_Shot_2020-03-27_at_3.48.24_PM Seat Link Doc Screen_Shot_2020-03-27_at_4.01.11_PM

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #212375

Edited by 🤖 GitLab Bot 🤖

Merge request reports