diff --git a/.gitpod.yml b/.gitpod.yml index 7642cfce294..6f00147ae6b 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -48,6 +48,8 @@ tasks: make gitlab-db-migrate fi cd /workspace/gitlab-development-kit/gitlab + # Display which branch we're on + git branch --show-current # Install Lefthook bundle exec lefthook install git checkout db/structure.sql diff --git a/app/views/admin/application_settings/_help_page.html.haml b/app/views/admin/application_settings/_help_page.html.haml index b71e8ca831e..ecf3203df9a 100644 --- a/app/views/admin/application_settings/_help_page.html.haml +++ b/app/views/admin/application_settings/_help_page.html.haml @@ -7,20 +7,22 @@ .form-group = f.label :help_page_text, _('Additional text to show on the Help page'), class: 'label-bold' = f.text_area :help_page_text, class: 'form-control gl-form-input', rows: 4 - .form-text.text-muted= _('Markdown enabled') + .form-text.text-muted= _('Markdown enabled.') .form-group .form-check = f.check_box :help_page_hide_commercial_content, class: 'form-check-input' = f.label :help_page_hide_commercial_content, class: 'form-check-label' do - = _('Hide marketing-related entries from the Help page.') + = _('Hide marketing-related entries from the Help page') .form-group = f.label :help_page_support_url, _('Support page URL'), class: 'label-bold' - = f.text_field :help_page_support_url, class: 'form-control gl-form-input', placeholder: 'http://company.example.com/getting-help', :'aria-describedby' => 'support_help_block' - %span.form-text.text-muted#support_help_block= _('Alternate support URL for Help page and Help dropdown') + = f.text_field :help_page_support_url, class: 'form-control gl-form-input', placeholder: 'https://company.example.com/getting-help', :'aria-describedby' => 'support_help_block' + %span.form-text.text-muted#support_help_block= _('Alternate support URL for Help page and Help dropdown.') - if show_documentation_base_url_field? .form-group = f.label :help_page_documentation_base_url, _('Documentation pages URL'), class: 'label-bold' = f.text_field :help_page_documentation_base_url, class: 'form-control gl-form-input', placeholder: 'https://docs.gitlab.com' - + - docs_link_url = help_page_path('user/admin_area/settings/help_page', anchor: 'destination-requirements') + - docs_link_start = ''.html_safe % { url: docs_link_url } + %span.form-text.text-muted#support_help_block= html_escape(_('Requests for pages at %{code_start}%{help_text_url}%{code_end} redirect to the URL. The destination must meet certain requirements. %{docs_link_start}Learn more.%{docs_link_end}')) % { code_start: ''.html_safe, help_text_url: help_url, code_end: ''.html_safe, docs_link_start: docs_link_start, docs_link_end: ''.html_safe } = f.submit _('Save changes'), class: "gl-button btn btn-confirm" diff --git a/doc/api/index.md b/doc/api/index.md index d9b7afc2dc8..4048a27b81f 100644 --- a/doc/api/index.md +++ b/doc/api/index.md @@ -166,6 +166,11 @@ curl --header "Authorization: Bearer OAUTH-TOKEN" "https://gitlab.example.com/ap Read more about [GitLab as an OAuth2 provider](oauth2.md). +NOTE: +We recommend that OAuth access tokens have an expiration. You can use a `refresh_token` to refresh tokens. Integrations may need to be updated to refresh tokens prior to expiration, which is based on the [expires_in](https://datatracker.ietf.org/doc/html/rfc6749#appendix-A.14) property in the token endpoint response. + +A default refresh setting of two hours is tracked in [this issue](https://gitlab.com/gitlab-org/gitlab/-/issues/336598). + ### Personal/project access tokens You can use access tokens to authenticate with the API by passing it in either diff --git a/doc/ssh/index.md b/doc/ssh/index.md index fd95a483344..920117116e5 100644 --- a/doc/ssh/index.md +++ b/doc/ssh/index.md @@ -214,9 +214,12 @@ To use SSH with GitLab, copy your public key to your GitLab account. 1. In the **Title** text box, type a description, like _Work Laptop_ or _Home Workstation_. 1. Optional. In the **Expires at** box, select an expiration date. (Introduced in [GitLab 12.9](https://gitlab.com/gitlab-org/gitlab/-/issues/36243).) - The expiration date is informational only, and does not prevent you from using - the key. However, administrators can view expiration dates and - use them for guidance when [deleting keys](../user/admin_area/credentials_inventory.md#delete-a-users-ssh-key). + In: + - GitLab 13.12 and earlier, the expiration date is informational only. It doesn't prevent + you from using the key. Administrators can view expiration dates and use them for + guidance when [deleting keys](../user/admin_area/credentials_inventory.md#delete-a-users-ssh-key). + - GitLab 14.0 and later, the expiration date is enforced. Administrators can + [allow expired keys to be used](../user/admin_area/settings/account_and_limit_settings.md#allow-expired-ssh-keys-to-be-used). - GitLab checks all SSH keys at 02:00 AM UTC every day. It emails an expiration notice for all SSH keys that expire on the current date. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/322637) in GitLab 13.11.) - GitLab checks all SSH keys at 01:00 AM UTC every day. It emails an expiration notice for all SSH keys that are scheduled to expire seven days from now. ([Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/322637) in GitLab 13.11.) 1. Select **Add key**. diff --git a/doc/user/admin_area/settings/help_page.md b/doc/user/admin_area/settings/help_page.md index f941b5e69f2..1106425d64e 100644 --- a/doc/user/admin_area/settings/help_page.md +++ b/doc/user/admin_area/settings/help_page.md @@ -66,18 +66,24 @@ You can specify a custom URL to which users are directed when they: 1. In the **Support page URL** field, enter the URL. 1. Select **Save changes**. -## Redirect GitLab documentation links +## Redirect `/help` pages > - [Introduced](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/43157) in GitLab 13.5. -> - Enabled on GitLab.com and is ready for production use. Available to GitLab.com administrators only. +> - Enabled on GitLab.com and is ready for production use. NOTE: On self-managed GitLab, by default this feature is not available. To make it available, ask an administrator to [enable the `:help_page_documentation_redirect` flag](../../../administration/feature_flags.md). On GitLab.com, this feature is available but can be configured by GitLab.com administrators only. -Documentation links go to the `/help` section on the instance by default, but you can -redirect these links to an external documentation site like `https://docs.gitlab.com`: +The `/help` URL of a GitLab instance displays a basic version of the documentation sourced from the +[`doc` directory](https://gitlab.com/gitlab-org/gitlab/-/tree/master/doc) of GitLab. `/help` links +are often used for contextual help. + +You can redirect these `/help` links to either: + +- The more navigable and searchable version published at [`docs.gitlab.com`](https://docs.gitlab.com). +- A destination that meets [necessary requirements](#destination-requirements). 1. On the top bar, select **Menu >** **{admin}** **Admin**. 1. In the left sidebar, select **Settings > Preferences**. @@ -85,6 +91,18 @@ redirect these links to an external documentation site like `https://docs.gitlab 1. In the **Documentation pages URL** field, enter the URL. 1. Select **Save changes**. +### Destination requirements + +When redirecting `/help`, GitLab: + +- Redirects requests to the specified URL. +- Appends `ee` and the documentation path to the URL. +- Appends `.html` to the URL, and removes `.md` if necessary. + +For example, if the URL is set to `https://docs.gitlab.com`, requests for +`/help/user/admin_area/settings/help_page.md` redirect to: +`https://docs.gitlab.com/ee/user/admin_area/settings/help_page.html`. +