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
Steps to verify
- Go to Admin area -> Settings -> Preferences
- Expand Help page section
- Verify that
Documentation pages URL
is present - Check that the field can be updated and keeps the value
Screenshots
Default view
Error messages
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
-
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
Edited by Vasilii Iakliushin