Resolve "Allow Seat Link to be disabled through admin toggle"
What does this MR do?
This MR introduces a couple ways to disable the Seat Link feature:
- A configuration in
gitlab.yml
- 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
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
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 🤖