alexhrao / TheGiftHub

An app where users can list what gifts they want, and can reserve gifts for others.
https://www.thegifthub.org
1 stars 0 forks source link

Don't allow removal of group if user is admin #27

Open alexhrao opened 7 years ago

alexhrao commented 7 years ago

Problem

Right now, a user who administers a group could be removed - without transferring ownership! This shouldn't be allowed.

Solution

We have a variety of options available:

1. Delete group, not just remove admin

If I'm an admin, delete the group - effectively removing everyone else from this group as well

Pros

Simpler to implement, and we could even add some small confirmation (i.e., "are you sure? Removing this group will mean removing everyone else from this group. If you'd like to avoid doing this, transfer ownership first")

Cons

Easier to implement, but also easier for the user to mess up - accidentally deleting all group information which could be costly

Remarks

This question gets at the central problem - how do we allow an administrator to delete a group? Do we? This leads to the second Option:

2. Transfer ownership first, then remove me

If I'm an admin, transfer ownership to another user, then remove myself.

Pros

Cannot accidentally delete the group; allows simpler transfer and removal from a group

Cons

Harder to implement How does the user actually delete the group?