ifmeorg / ifme

Free, open source mental health communication web app to share experiences with loved ones
http://www.if-me.org/
GNU Affero General Public License v3.0
1.47k stars 737 forks source link

Give user option of temporarily disabling account. #796

Open asquare14 opened 6 years ago

asquare14 commented 6 years ago

Description

I think in "Customize your profile", the user should be given the option of temporarily disabling their accounts. Permanently deleting will lead the user's all data to be lost while temporarily deleting will give the user a chance to rejoin the community again from where they left.


Please assign yourself (via the Assignees dropdown), if you do want to work on this issue. Can't find yourself? You need to join our organization.

Check out our Picking Up Issues guide if you haven't already!

julianguyen commented 6 years ago

This is a good idea, I think we should still keep the option to permanently delete the account.

We'll have to think through what temporarily disabling it means though. Would this prevent the user from having their content visible to allies?

asquare14 commented 6 years ago

I was thinking of something along the lines of deactivating the account in facebook, it won't be visible to allies, in functionality it will be similar to delete permanently, the difference being data will not be lost and can be recovered. This might be of relevance https://stackoverflow.com/questions/5140643/how-to-soft-delete-user-with-devise And Yes we should keep option of permanent deletion, just add this feature. :D

baohouse commented 6 years ago

Wait, so those people on Facebook who I thought deleted their accounts were actually just deactivated? Ohhh... that makes me seem kind of a jerk for cleaning out my relationship with them. 😞 So would suspending the account mean you won't be able to lurk and view your allies' activity as well (since they cannot see yours)? And it probably means you should be able to read content you're the author of.

julianguyen commented 6 years ago

Yeah so how Facebook works when you deactivate your account (I do this a lot lol), no one can see your profile or interact with it. You are re-activated the minute you sign back in.

So in order to achieve something similar on our platform we would have some kind of "active" flag on a User account. If it's set to false then hide that user from any ally lists, ally search, the stories feed, and any strategies list they previously shared their content on.

haleymnatz commented 6 years ago

Hey @julianguyen, @baohouse, and @aSquare14, is this feature vetted and ready to be implemented? If so, I'd be happy to work on it. :)

carlqt commented 5 years ago

Thanks for the invite, let me take a crack at this.

julianguyen commented 5 years ago

Hey, @carlqt can you assign yourself to this issue? You should have received an invite to join the org in your email. Thank you! :)

carlqt commented 5 years ago

Hey guys, was wondering what are the restrictions of a disabled user. Aside from being hidden from searches and allies list.

asquare14 commented 5 years ago

I think he or she cannot join groups ,stratergies and moments.

carlqt commented 5 years ago

Questions:

For an easier approach, should we just restrict a disabled user to accessing group/moods/medications/allies etc…? The only page that is accessible would be the profile page wherein he can decide to reactivate his account? The flow I’m thinking is that we redirect the user back to his profile and display a flash message saying he’s unable to navigate to these pages unless he reactivates back his account.

julianguyen commented 5 years ago

@carlqt Sorry for the late reply to this! I think we want to restrict access to all pages and create a new page that allows the user to re-enable their account!

akp2603 commented 3 years ago

Hi! I would be really interested to work on this one. Is this still open? (Will be needing a little guidance, this is going to be my first open source contribution)

julianguyen commented 3 years ago

Hey @akp2603 looks like this issue is available!

tlansey commented 3 years ago

Looks like no one is on this one now! I'm sending a request to join soon and plan to assign myself to this issue once all that has been set up! First time contributing to open source :)

julianguyen commented 3 years ago

@tlansey It would be great for you to work on this! Thank you :)

kkreine commented 2 years ago

It’s been a while since this issue has been touched, so I’d like to outline the feature to be sure I understand it correctly.

A disabled account

This can be achieved by using an “active” flag on accounts set to true or false.

Method for re-activating account:

julianguyen commented 2 years ago

@kkreine

Those specs are a good starting point! I think modal that pops up giving disabled users the option to reactivate their account after a signing in (with password and through Facebook/Google OAuth).

There are some edge cases to consider and talk through more after addressing what you outlined:

If it helps, feel free to make issues for specific tasks to work on! Let me know how else I can help/unblock!

kkreine commented 2 years ago

@julianguyen I think it makes sense to change the name from “disabled” to something such as “paused.” Disabled is used to describe people physically or mentally disabled, and it sounds off to call an account “disabled” given the other usages of the word. Any ideas other than “paused”?

How are comments and ally invites from banned and deleted users dealt with? That could influence how paused users are handled.

Here are my ideas for the edge cases:

I noticed ifme is not using scopes, but one way to deal with this could be using one. Are you open to adding a scope to ifme for this issue? We could use a boolean scope of “paused” that is defaulted to false, and upon pausing the account, the field is changed to true. We could exclude banned and deleted users from the scope. Using default_scope is an option, but I think it has the potential to introduce more issues and might be better to avoid, but let me know if you think this is the right fit for ifme.

I have to look into implementation further, but I wanted to know your thoughts first. I am happy to think further about implementations that avoid scopes. Let me know what you think.

julianguyen commented 2 years ago

@kkreine That's a great idea to change the wording to "paused"! Thanks so much for bringing that up! We'll also want to make sure we use inclusive language for our other translations.

For deleted users, they are deleted. For banned users, they are just hidden from the UI.

  1. I like the idea of keeping them and showing them with a removed label.
  2. I agree that ally invites should be revoked. I think the ability to re-send them all would be nice, but not a priority. I would focus on making sure they are revoked at the least.

Yeah I'm open to using scopes if the pros outweigh the cons. What are some potential issues we would face?

Thanks for taking the time to write this out! Fantastic questions and suggestions :)

mapra99 commented 1 year ago

Hey @julianguyen @tlansey is this issue up for grabs? I'd like to work on it. I'm seeing there is already #1944 which looks like it got parked for a long while, I'd be happy to continue that work if that's ok