Projet

Général

Profil

Development #10658

Account management when the user has no password

Ajouté par Mikaël Ates (de retour le 29 avril) il y a environ 8 ans. Mis à jour il y a presque 8 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
-
Catégorie:
-
Version cible:
Début:
14 avril 2016
Echéance:
% réalisé:

100%

Temps estimé:
Patch proposed:
Oui
Planning:

Description

If the user has no password :
  • change password : not visible
  • change email : visible but the form requires a password
  • delete account : visible but the from requires a password
Maybe we could change that in :
  • change password : visible -> but rather 'Set password'
  • change email : not visible or inactive
  • delete account : not visible or inactive

Fichiers

Révisions associées

Révision 2ba49444 (diff)
Ajouté par Mikaël Ates (de retour le 29 avril) il y a presque 8 ans

Adapt account management when the user has no password (fixes #10658).

Historique

#1

Mis à jour par Mikaël Ates (de retour le 29 avril) il y a environ 8 ans

  • Fichier 0001-Adapt-account-management-when-the-user-has-no-passwo.patch ajouté
  • Patch proposed changé de Non à Oui
#2

Mis à jour par Benjamin Dauvergne il y a environ 8 ans

There are deployment where we cannot allow people to change their password at all, I would like a difference:
  • password change is forbidden
  • user has no password

I think an implementation could be to add a new setting A2_CAN_CHANGE_PASSWORD and a new method to the user model named can_change_password() whose first implementation would just return the vaule of A2_CAN_CHANGE_PASSWORD, if A2_CAN_CHANGE_PASSWORD your patch is ok we keep it, if can_change_password() returns False we just do not show the password change forms. It should be combined we A2_CAN_RESET_PASSWORD (if A2_CAN_CHANGE_PASSWORD is False, whatever the value of A2_CAN_RESET_PASSWORD, it should be impossible to reset a password by mail).

Using a method on the User object should allow other frontends to return user models which do not allow resetting the password for whatever reason. My main use case if the LDAP backend where sometimes userPassword is not writable at all.

#3

Mis à jour par Mikaël Ates (de retour le 29 avril) il y a presque 8 ans

  • Fichier 0001-Adapt-account-management-when-the-user-has-no-passwo.patch ajouté

There is already the settings A2_REGISTRATION_CAN_CHANGE_PASSWORD and password_change_view is protected with @decorators.setting_enabled('A2_REGISTRATION_CAN_CHANGE_PASSWORD').

I think that you mean with "first implementation" that password change capability could be determined per user is a second step. If it is the case, maybe we could open another ticket for this feature and keep for the moment the way it works with the setting A2_REGISTRATION_CAN_CHANGE_PASSWORD.

#4

Mis à jour par Mikaël Ates (de retour le 29 avril) il y a presque 8 ans

  • Fichier 0001-Adapt-account-management-when-the-user-has-no-passwo.patch supprimé
#5

Mis à jour par Mikaël Ates (de retour le 29 avril) il y a presque 8 ans

  • Fichier 0001-Adapt-account-management-when-the-user-has-no-passwo.patch supprimé
#7

Mis à jour par Benjamin Dauvergne il y a presque 8 ans

Ack.

#8

Mis à jour par Mikaël Ates (de retour le 29 avril) il y a presque 8 ans

  • Statut changé de Nouveau à Résolu (à déployer)
  • % réalisé changé de 0 à 100
#9

Mis à jour par Mikaël Ates (de retour le 29 avril) il y a presque 8 ans

  • Statut changé de Résolu (à déployer) à En cours

Plutôt que de masquer les liens si l'utilisateur n'a pas de mot de passe il faut modifier les formulaires pour ne pas demander le mot de passe.
Lorsque #10802 sera implémenté, supprimer les conditions user.has_usable_password sur les liens modification de l'email et suppression de compte.

#10

Mis à jour par Mikaël Ates (de retour le 29 avril) il y a presque 8 ans

  • Version cible mis à 2.2.0
#11

Mis à jour par Mikaël Ates (de retour le 29 avril) il y a presque 8 ans

  • Statut changé de En cours à Fermé

Conditions supprimées dans #10802.

Formats disponibles : Atom PDF