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 |
![]() |
![]() |
parent group is private
|
![]() |
![]() |
How to set up and validate locally
- Go to your gdk
- Click the [+] button on top of the sidebar and choose [New project/repository]
- Choose a [Blank project], click [Next]
- Choose different groups and namespaces to see how parent visibility affects your choice options
- Go to the admin panel, http://gdk.test:3000/admin/application_settings/general#js-visibility-settings
- Restrict any visibility level you want. Do not forget to save your choice
- Go back to the project creation form, nothing should be changed for you
- Go back to the admin panel, http://gdk.test:3000/admin/users
- Choose any user who is a part of a few groups
- Click [Impersonate]
- Go back to the project creation form
- 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