Manager cannot update student/assistant
Summary
Whenever a manager tries to delete a student or assistant it does not work. The @permissionService canUpdateParticipant
returns the right boolean value and it goes inside the method removeParticipant
but roleRepository.delete(role)
does not do anything.
Probable Causes
Whenever user.getRoles()
gets called it does not work anymore. Teachers can delete users fine, but whenever a teacher just calls teacher.getRoles()
and does not do anything with the value, the deletion will fail.
Possible Fix
It seems to be that user.getRoles()
contains a side-effect where deletion from a repository does not work.
Steps to reproduce
- Log in as a manager
- Go to
/course/[number]/participants
- Delete either a student, assistant or manager
- Methods are run, but no role is deleted from the repository
Edited by Thijs Nulle