Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handling when a user tries to unsubscribe from a mailing list they created #284

Closed
soyapark opened this issue Jun 17, 2020 · 3 comments · Fixed by #287
Closed

Handling when a user tries to unsubscribe from a mailing list they created #284

soyapark opened this issue Jun 17, 2020 · 3 comments · Fixed by #287
Assignees

Comments

@soyapark
Copy link
Member

Assigned to @raxelg

Copying from previous Raxel's heuristic evaluation #283

One possible user flow is 1) if there is another admin, they * can * unsubscribe from the list. 2) if they are the only admin, we should give warning that "if you unsubscribe from the list, it will remove this mailing list".

Before implementation, please suggest mock-up or plans.

@raxelg
Copy link
Contributor

raxelg commented Jun 18, 2020

@soyapark I agree with the user flow. Since the model does not keep track of who created the mailing list, the only scenario where this is an issue is if the user unsubscribing is the last remaining admin. So I can check this condition.

Update: I will be storing the number of admins in the mailing list in the group_info object passed to the html where I will store the value in a hidden

element. I will reference that value in the jQuery to either allow the user to unsubscribe if there is more than one admin, else I will send an alert message telling the user to either delete the group or make another person admin and then unsubscribe. I prefer this behavior over having an option to delete the database in the alert message because unsubscribing from the mailing list is much different from deleting the mailing list so to make sure they want to delete it, they should press the delete button.

@soyapark
Copy link
Member Author

Update: I will be storing the number of admins in the mailing list in the group_info object passed to the html where I will store the value in a hidden element.

Why don't you query the number rather than storing the number upfront? What if every other admin already unsubscribe after the user loads this page? Using your algorithm, the stored data will be more than 1, so it will let the user to unsubscribe but it shouldn't or give them warning. Instead, whenever an admin tries to unsubscribe from the group, you can query db to find the current number of admins in this group * on demand *. This way, it will be more up-to-date.

@raxelg
Copy link
Contributor

raxelg commented Jun 19, 2020

I see what you're saying I will query the db, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants