Potential problem
When a user wish to unregister, they use again the /ulb command and click the "confirm delete my data..." button, their server's setup verification role is removed. Should we also remove ALL other roles because those can still permit access to non-public channels even without the server's setup verification role?
Example:
- User registers and gets verified -> Gets
ULB student role
- User can then get other roles through some reaction roles bot to access even more channels
- User wishes to unregister this account -> Gets their
ULB student role removed
- User still has the other roles assigned, so they can still access restricted channels [-This is probably problematic-]
Solution
Loop through all of their roles and removes them all, not only the server's setup verification role.
Should interfere with moderator roles etc because the bot shouldn't have higher permissions than those, so users with higher privileged roles should remove it by themselves
See https://github.com/bepolytech/ULBDiscordBot/blob/dev/classes/utils.py#L196
Potential problem
When a user wish to unregister, they use again the
/ulbcommand and click the "confirm delete my data..." button, their server's setup verification role is removed. Should we also remove ALL other roles because those can still permit access to non-public channels even without the server's setup verification role?Example:
ULB studentroleULB studentrole removedSolution
Loop through all of their roles and removes them all, not only the server's setup verification role.
See https://github.com/bepolytech/ULBDiscordBot/blob/dev/classes/utils.py#L196