Add organization fields to new user form in admin area
What does this MR do and why?
Related to #448811 (closed)
The grouptenant scale team is working on building the Organization MVC. For more information about what an "Organization" will be see https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/organization/#organization-mvc
This MR adds an organization section to the new user form in the admin area. When there is only the default organization in the instance (all instances have default organization) it shows that organization avatar and lets you pick a role for the user. When there are multiple organizations in an instance it shows an organization selector and allows you to select the organization you want to add the user to as well as the role for the user.
Important note: these new fields will not persist when saved yet because the controller has not yet been updated. This will be updated in #481899 (closed)
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Instance only has default organization
Mobile | Desktop |
---|---|
Instance has multiple organizations
Mobile | Desktop |
---|---|
How to set up and validate locally
- Go to http://gdk.test:3000/rails/features
- Enable the
ui_for_organizations
andallow_organization_creation
feature flags - Go to http://gdk.test:3000/admin/application_settings/general. In the
Account and limit
section check theAllow users to create organizations
box. - Go to http://gdk.test:3000/admin/users/new
- Go to http://gdk.test:3000/-/organizations/new and create an organization
- Go back to http://gdk.test:3000/admin/users/new, you should see an organization selector