Handle group deletion when access level of deleting user changes
Problem to solve
When a group is scheduled for deletion, it can so happen that the user's access level is lowered before the actual deletion happens.
Proposal
If the access level is downgraded to below maintainer, destroy the associated group_deletion_schedule record.
If the access level is downgraded from group owner or administrator to maintainer, do nothing as the user still has access to delete the group.
Mapping of access levels can be found in this module.
Technical implementation
backend - 2
- Modify the
updateservice to delete user'sgroup_deletion_schedulerecord based on the new access level.
Note: the same service is also used for access level change of project members, and should only include this change for group members.
Edited by Aishwarya Subramanian