Assign additional Organization Owners
Problem
Once the initial Organization Owner is assigned correctly during Organization creation, we want to enable that Owner to assign additional Organization Owners.
Possible solution
We could use the current Admin Area flow to inspire the flow to assign an additional Organization Owner.
- New user: Admin will go to
Admin Area > Users, and create a new user, at that time they can set them as an instance admin or regular user in the creation form. - Existing user: Admin will got to the
Admin Area > Users, and edit an existing user. At that time they can set them as an instance admin or regular user in the edit form.
Proposal
Add a column to the Organization users list to display/edit the role of the user. To make room we will need need to remove the Created on column.
-
Selectable roles are OwnerandUser -
Only Organization Owners have access to Organization > Users -
Only Organization Ownerscan change the role of a user
Implementation guide
- Add an
organizationRolefield toapp/assets/javascripts/vue_shared/components/users_table/users_table.vue. Expose a slot to render this field. - Add a
fieldsToRenderprop toapp/assets/javascripts/vue_shared/components/users_table/users_table.vue - Add the ability checked in #478031 (closed) to
app/graphql/types/permission_types/organization_user.rb - In
app/assets/javascripts/organizations/users/components/users_view.vuecheck if the user has permission to change a user's role. If they do, render a dropdown, if they don't render their role in text. - When the dropdown is changed, put in loading state, make call to GraphQL mutation added in #478031 (closed), render success toast.
- Use the
fieldsToRenderprop to showorganizationRolefield and to hidecreatedAtfield
Edited by Peter Hegman
