Skip to content

Maybe remove ALL roles from member on user's unregistration #52

@LucasPlacentino

Description

@LucasPlacentino

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:

  1. User registers and gets verified -> Gets ULB student role
  2. User can then get other roles through some reaction roles bot to access even more channels
  3. User wishes to unregister this account -> Gets their ULB student role removed
  4. 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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions