Owner changes their own role to User
Background
In #441246 (closed) we made it so organization owners can change the role of organization users. This includes being able to change their own role if there is another owner in the organization. But only organization owners can see the organization user dashboard so if you change your own role from Owner to User you are then get a 404.
Screen_Recording_2024-11-12_at_8.50.22_AM
Proposal
Move changing role into a drawer similar to what we do on group/project member pages
| Changing role has no affect on your access to page | Changing role will cause loss of access to page |
|---|---|
![]() |
![]() |
Implementation guide
- Add a new
user_details_drawer.vuecomponent toapp/assets/javascripts/organizations/users/components -
user_details_drawer.vueshould accept auserprop. If this prop is notnullset theopenprop totrue -
user_details_drawer.vueemits acloseevent when closed. - Render
app/assets/javascripts/vue_shared/components/users_table/user_avatar.vueinuser_details_drawer.vue - Move role change logic in
app/assets/javascripts/organizations/users/components/users_view.vuetouser_details_drawer.vue - Show warning if an Owner is changing their role to User
- Render
user_details_drawer.vueinapp/assets/javascripts/organizations/users/components/users_view.vue - When role is clicked keep track of what user was clicked in a
userDetailsDrawerActiveUserreactive data attribute. - Pass
userDetailsDrawerActiveUsertouser_details_drawer.vueasuserprop - Listen for
closeevent on drawer and setuserDetailsDrawerActiveUsertonull
Edited by Peter Hegman

