Skip to content

Add Documentation URL option to Admin area

What does this MR do?

Issue: #32328 (closed)

We want to add an option to customize Documentation URL option in Admin area.

This MR introduces a help_page_documentation_url field to application_settings table and adds logic to update this value.

Next MR that adds redirects to help_page_documentation_url - !43157 (merged)

Feature flag issue

#255328 (closed)

Steps to verify

  1. Go to Admin area -> Settings -> Preferences
  2. Expand Help page section
  3. Verify that Documentation pages URL is present
  4. Check that the field can be updated and keeps the value

Screenshots

Default view

Screenshot_2020-09-22_at_16.26.36

Error messages

Screenshot_2020-09-22_at_16.24.52

Migrations output

Migrate

== 20200917121650 AddHelpPageDocumentationUrlToApplicationSettings: migrating =
-- add_column(:application_settings, :help_page_documentation_base_url, :text)
   -> 0.0014s
== 20200917121650 AddHelpPageDocumentationUrlToApplicationSettings: migrated (0.0015s)

== 20200921113722 AddTextLimitToHelpPageDocumentationUrl: migrating ===========
-- transaction_open?()
   -> 0.0000s
-- execute("ALTER TABLE application_settings\nADD CONSTRAINT check_57123c9593\nCHECK ( char_length(help_page_documentation_base_url) <= 255 )\nNOT VALID;\n")
   -> 0.0023s
-- execute("ALTER TABLE application_settings VALIDATE CONSTRAINT check_57123c9593;")
   -> 0.0014s
== 20200921113722 AddTextLimitToHelpPageDocumentationUrl: migrated (0.0121s) ==

Revert

== 20200921113722 AddTextLimitToHelpPageDocumentationUrl: reverting ===========
-- execute("ALTER TABLE application_settings\nDROP CONSTRAINT IF EXISTS check_57123c9593\n")
   -> 0.0007s
== 20200921113722 AddTextLimitToHelpPageDocumentationUrl: reverted (0.0054s) ==

== 20200917121650 AddHelpPageDocumentationUrlToApplicationSettings: reverting =
-- remove_column(:application_settings, :help_page_documentation_base_url, :text)
   -> 0.0007s
== 20200917121650 AddHelpPageDocumentationUrlToApplicationSettings: reverted (0.0008s)

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
Edited by Vasilii Iakliushin

Merge request reports