Skip to content

Add group file templates to registration features

Taras Tadai requested to merge 422273-add-group-file-tmpl-to-reg-features into master

What does this MR do and why?

We want to add Group file templates to features available to users who have service ping data sharing enabled.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
enable_reg_features_off enable_reg_features_on
group_templates_settings_off group_templates_settings_on
group_templates_new_file_off group_templates_gitignore_templates group_templates_new_file_on

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Testing previous behavior:
    • Make sure you're on a Premium/Ultimate plan GitLab GDK instance
    • Create repository with file templates inside
    • Select some group
    • Select Settings -> General -> Templates in Group sidebar and define file templates repository
    • Try to use the feature - it should be enabled and working according to the documentation.
      • Try to add new .gitignore file to some repository(from this group) using UI to check if you have group file templates available in templates dropdown.
  2. When registration features are enabled:
    • Make sure you're on a free plan GitLab GDK instance (for example, remove current license or stub #current to return nil)
    • Make sure you have the Registration Features checkbox enabled (Admin -> Settings -> Metrics and profiling -> Usage statistics -> Enable Service Ping & Enable Registration Features)
    • Create repository with file templates inside
    • Select some group
    • Select Settings -> General -> Templates in Group sidebar and define file templates repository.
    • Try to use the feature - it should be enabled and working according to the documentation
  3. When registration features are disabled:
    • Make sure you're on a free plan GitLab GDK instance
    • Make sure you have the registration features checkbox disabled (Admin -> Settings -> Metrics and profiling -> Usage statistics -> Enable Registration Features)
    • Select some group
    • Group file templates feature should be disabled and not usable
      • No Templates section in Group settings Settings -> General
      • No Group file templates available on New file page
  4. Make sure that the new text appears on the docs page:
    • run gdk restart gitlab-docs
    • go to <local_gitlab_docs_host>/ee/user/admin_area/settings/usage_statistics.html#registration-features-program and make sure the new section is on the page and the link works
Updated doc Link page
group_file_templates_doc group_file_template_doc2

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #422273 (closed)

Edited by Suraj Tripathi

Merge request reports