Description
Implement functionality to delete a role to a specific user on the specific user page roles table when clicking on the trash icon button in the actions column.
Acceptance criteria
- The Actions column shows a trash icon to remove that role assignment, if the viewing user has
manage_course_team or manage_library_team on the relevant scope.
- If the viewing user is looking at their own admin assignment, the trash icon is grayed out. Hovering or clicking it shows a tooltip explaining that an admin cannot remove their own admin role assignment.
- Super Admin and Global Staff entries show a different icon instead of the trash (icon TBD). Hovering or clicking it shows a tooltip explaining that these roles are managed via Django, with a link to documentation.
Specs
- When clicking the trash icon button a confirmation modal shows on screen.
- The modal asks for confirmation for role removal and displays cancel and remove buttons.
- Clicking the remove button, the modal gets closed and returns to the roles table view.
- Clicking on the remove button. the role gets removed and the modal closes.
- If removal is successful, a toast message appears confirming successful removal.
- If an error happens during the removal process, a toast message shows indicating that.
- When the removal is successful, if the specific user has more roles assigned, the specific user view with roles table is shown.
- When the removal is successful, if the specific user has no more roles assigned, it redirects to the team members tab with the team members table.
- The user can not remove their own admin role, the delete button for that scenario is disabled and on hover a tooltip appears indicating so.
- The roles from django admin can not be removed. The delete button for that scenario is disabled and on hover a tooltip appears indicating so.
Design
Description
Implement functionality to delete a role to a specific user on the specific user page roles table when clicking on the trash icon button in the actions column.
Acceptance criteria
manage_course_teamormanage_library_teamon the relevant scope.Specs
Design