Skip to content

Create project:Add visibility selector

What does this MR do and why?

Add a visibility selector to the project creation shared fields component.

Some logic behind:

  • A new project should have less or equal visibility with its parent group. If the parent group has "internal" visibility, "public" visibility will be inaccessible for a new project.
  • Personal projects don't have a parent group, so they don't have this restriction.
  • Admin could turn off some visibility levels in admin settings. These levels will be disabled for all projects, but not for the admin.
  • Admin can change the default level in admin settings.

Important

These changes are behind the new_project_creation_form feature flag. They won't be available to users until all the work is done. See the plan here #514700 (closed)

References

FF plan: #514700 (closed)

UX Paper Cuts planning issue: #512695 (closed)

Screenshots or screen recordings

user admin
internal is restricted by admin CleanShot_2025-05-02_at_16.58.39_2x CleanShot_2025-05-02_at_16.59.19_2x
parent group is private CleanShot_2025-05-02_at_16.58.54_2x CleanShot_2025-05-02_at_16.59.36_2x

How to set up and validate locally

  1. Go to your gdk
  2. Click the [+] button on top of the sidebar and choose [New project/repository]
  3. Choose a [Blank project], click [Next]
  4. Choose different groups and namespaces to see how parent visibility affects your choice options
  5. Go to the admin panel, http://gdk.test:3000/admin/application_settings/general#js-visibility-settings
  6. Restrict any visibility level you want. Do not forget to save your choice
  7. Go back to the project creation form, nothing should be changed for you
  8. Go back to the admin panel, http://gdk.test:3000/admin/users
  9. Choose any user who is a part of a few groups
  10. Click [Impersonate]
  11. Go back to the project creation form
  12. Now you should see visibility restrictions

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Julia Miocene

Merge request reports

Loading