mumuki / mumuki-domain

💡 Mumuki's domain model
GNU Affero General Public License v3.0
1 stars 0 forks source link

Allow users to be deleted #86

Open flbulgarelli opened 4 years ago

flbulgarelli commented 4 years ago

:stop_sign: :bust_in_silhouette: We need users to be deleted, at least in a logical way. This idea impacts several features:

  1. :lock: Login: user should not be able to login again, even if the login provider permits it. This is important for security reasons: nobody should be able to reclaim a deleted identity
  2. :video_game: Gamification: user should not be displayed with its real name in any kind of board or rank. Alternatively, it could be displayed with a standard "deleted account" username and image, like github's ghost account https://github.com/ghost
  3. :left_speech_bubble: Discussions: User's discussions may remain intact, but user identity should be replaced following previously mentioned guidelines.
  4. :school: Classroom: It should be dettached from every course they belong
  5. :mailbox: No new notifications should be sent by email
  6. If user is soft-deleted, permissions and progress should be deleted, at least in posgres database.

It would be nice to allow them to delete they account from the UI, but this is not a core requeriment.

flbulgarelli commented 4 years ago

:up: Update

We need users to be deleted, at least in a logical way. This idea impacts several features:

  1. lock Login: user should not be able to login again, even if the login provider permits it. This is important for security reasons: nobody should be able to reclaim a deleted identity

:heavy_minus_sign: Mostly done in https://github.com/mumuki/mumuki-domain/pull/90 and https://github.com/mumuki/mumuki-laboratory/pull/1406. Although login is permitted, every action is blocked.

:warning: We should still block user from login provider, in order to avoid weird situations when other uses try to accidentally reclaim identity, and gets it at the login-provider-level, but not application level.

  1. video_game Gamification: user should not be displayed with its real name in any kind of board or rank. Alternatively, it could be displayed with a standard "deleted account" username and image, like github's ghost account https://github.com/ghost

:heavy_minus_sign: Mostly done. Only avatars are missing

  1. left_speech_bubble Discussions: User's discussions may remain intact, but user identity should be replaced following previously mentioned guidelines.

:heavy_check_mark: Done

  1. school Classroom: It should be dettached from every course they belong

:x: Not yet

  1. mailbox No new notifications should be sent by email

:heavy_check_mark: Done

  1. If user is soft-deleted, permissions and progress should be deleted, at least in posgres database.

:x: Not yet

It would be nice to allow them to delete they account from the UI, but this is not a core requeriment.

:x: Not yet

flbulgarelli commented 3 years ago

@NadiaFinzi @LauraMangifesta

Con @faloi pensamos el siguiente flujo:

  1. Le usuarie entra a su perfil y selecciona la opción de eliminar cuenta
  2. Se pide confirmación y se envía un mail a la persona con el link para efectivamente borrarla
  3. Haciendo click en el link que viene en el mail, la plataforma finalmente te envía a la sección de eliminar cuenta, te pide que confirmes nuevamente ingresando tu nombre de usuarie (como hace github) y elimina definitivamente

Charlando con @NadiaFinzi pensamos que también sería interesante que el paso 3 te obligue a volver a iniciar sesión antes de proseguir (si bien no es un sudo-mode, sí te obliga a volver a ingresar tus credenciales en caso de que alguien haya accedido a tu cuenta sin permiso)

flbulgarelli commented 3 years ago

Charlando con @NadiaFinzi pensamos que también sería interesante que el paso 3 te obligue a volver a iniciar sesión antes de proseguir (si bien no es un sudo-mode, sí te obliga a volver a ingresar tus credenciales en caso de que alguien haya accedido a tu cuenta sin permiso)

:up: Tras nuevas charlas, pensamos que en realidad esta opción es mejor que eliminar via link por mail, porque es menos ambigua en el caso de que dos personas pongan el mismo mail de contacto o alguien no tenga acceso a dicho mail.

Teniendo en cuenta eso, el flujo ideal sería el siguiente:

  1. Le usuarie entra a su perfil y selecciona la opción de eliminar cuenta
  2. Se pide confirmación (por ejemplo ingresando una palabra clave como BORRAR) y te redirije a la pantalla de eliminar pero deslogueandote previamente, y redirigiendote a una pantalla de login especial que ya tenga pre-cargado el nombre de usuario, y que una vez logueade sólo funcione si uid es el mismo que inició la operación.
  3. Desde esta pantalla efecitvamente borrás la cuenta

El problema de esta alternativa es que no se si es posible implementar el item 2 (no parece algo que los identity providers permitan de forma general), menos aún que se pueda implementar de forma clara sin dar la sensación de que el proceso de borrado ya culminó, cuando aun hay que confirmarlo; ¿@julian-berbel @luchotc qué piensan?

En caso de no poder implementarse así, entonces sí volvemos a la propuesta anterior (basada en enviar link de confirmación).

luchotc commented 3 years ago

We should add something like this in T&C: "Copies of some materials such as log records may remain in our database but are disassociated from personal identifiers."

Also, we should update T&C section which talks about account deletion to include this new flow.

This is just for @NadiaFinzi.

luchotc commented 3 years ago

Final flow:

faloi commented 3 years ago

First UI drafts, @felipecalvo @flbulgarelli @luchotc please comment.

1 - Delete account section

It's a partial, so it can be moved to a proper place in the new user menu.

image

2 - First confirmation dialog

delete-modal

3 - Mail confirmation sent

image

luchotc commented 3 years ago

Like it a lot! The final placement won't be that but as you've said it's a partial and we can move it. I would suggest moving the account info, just the name for now, to the modal body and leave just Eliminar cuenta as title.

faloi commented 3 years ago

Agree, check now:

image

felipecalvo commented 3 years ago

Something I'm not sure of is the perderás acceso a los siguientes recorridos part. Public organizations won't be listed there, and that's alright, but progress will still be lost on them. Maybe something along the lines of Perderás todo tu progreso en mumuki, y no podrás volver a acceder a: is clearer?

I understand it's already mentioned on the delete account box, but still.

It looks good in any case, though! I'm also tempted to add one of those ominous Esta acción no se puede deshacer. messages somewhere. (Well, I guess it could be stopped if you don't follow the instructions on the email, whatever they are). Too much text!