#106 [enh] Allow visitors to join by registering on coin

Fermé
ljf veut fusionner 0 commits à partir de ARN/registration vers FFDN/master
ljf a commenté il y a 8 ans

This PR let visitors to join by registering on coin.

There are several settings added :

Account registration
Allow visitor to join the association by register on COIN
REGISTRATION_OPEN = True

All account with unvalidated email will be deleted after X days
ACCOUNT_ACTIVATION_DAYS = 7

Additionnal security salt use to build validation link
REGISTRATION_SALT = "PojhNNNNusqdfqfhaz851"

Template string to display the label the member should indicates for the bank
transfer
BANK_TRANSFER_LABEL = "ID{{ user.pk }}"

So if you put False in REGISTRATION_OPEN, the current behaviour (no registration possibility but password reset) is applyed.

This PR let visitors to join by registering on coin. There are several settings added : Account registration Allow visitor to join the association by register on COIN `REGISTRATION_OPEN = True ` All account with unvalidated email will be deleted after X days `ACCOUNT_ACTIVATION_DAYS = 7` Additionnal security salt use to build validation link `REGISTRATION_SALT = "PojhNNNNusqdfqfhaz851"` Template string to display the label the member should indicates for the bank transfer `BANK_TRANSFER_LABEL = "ID{{ user.pk }}"` So if you put False in REGISTRATION_OPEN, the current behaviour (no registration possibility but password reset) is applyed.
jocelyn a commenté il y a 8 ans
Propriétaire

I'm very happy that you started using coin, and contributing to it.

Thanks a lot for that one, opening online subscription might help a lot growing structures :-).

It took me time to start that review, because… it's not a tiny contribution, and gogs does not make the review process specially comfy :-/

Feel free to discuss my remarks :-) Beside, I'd love to have another pair of eyes on that one. @opi @daimrod ?

Functional review

This workflows (self-registration) simplifies things. But maybe we should add some text at top or bottom of the form, stating that registering implies adhering to statuts/RI ?

We have a pending status on members, what do you think about initializing the web-registered members with that pending status ?

Technical review

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-4857e5838f3f748e6f5f7c7d54311a9234cf239R11

Weird spacing above the first arrow.

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-d7eda6505fce05fb529670de5746ab70a1cc135R10

2 blank lines is enough

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-d7eda6505fce05fb529670de5746ab70a1cc135R24

Maybe we should let the option to get that username auto-generated (like in MemberCreationForm).

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-d7eda6505fce05fb529670de5746ab70a1cc135R23

un-needed backslash

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-6622e551e4c325836ad255f65865d4bfc065f06R7

Libélé->libellé.

I think this text is a bit too specific to your organization (mentioning one membership fee and one payment mean. Maybe this text goes too much into details for being a good default.

I'd like that other people give their opinion on that point)

You could use an ISP-specific template for that (see doc).

(besides, I prefer <strong> over <b> but that… may just be nitpicking).

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-1274d2c9a3ed6ba9ce26b1961a5a7b63be2acfcR61

Prefer render() which use the simpler dict-based context. (render_to_response is on deprecation path.)

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-2a99361e7e2b07f615828b6e5d4592d24a40dbfR10

Unused import (actually, I don't see ExtraContextTemplateView used anywhere, but I may be missing it).

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-2a99361e7e2b07f615828b6e5d4592d24a40dbfR23

You could use decorator form, but that's a matter of preference, after all :-)

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-f08ea9e22c2c089b7a9e63f2894ea0bb5155004R47

I'd reword a bit the titles to make it clearer :

  • « C'est la première fois que vous vous connectez ? »
  • « Pas encore adhérent·e ? »

Besides, even if registration is open, we want to display the first title also ; the member could have been registered by somenone else and don't know his/her password.

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-f08ea9e22c2c089b7a9e63f2894ea0bb5155004R52

Same as before, seems too specific to me.

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-4857e5838f3f748e6f5f7c7d54311a9234cf239R10

I would rephrase, being more generic : « si vous avez adhéré autrement que via ce formulaire en ligne ».

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-2a99361e7e2b07f615828b6e5d4592d24a40dbfR4

Unused import

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-1274d2c9a3ed6ba9ce26b1961a5a7b63be2acfcR61

Prefer render() (I know there are render_to_response in this very file, but that's from django old times, pre-render era ;-)

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-81db325a7c48bb6ea64cbacde390e79ef2ab4fbR272

I think we should either use a random string (let's be clear, that remains less good than choosing a local salt), or use None by default. I don't like puting joke in security parameters :-)

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-1274d2c9a3ed6ba9ce26b1961a5a7b63be2acfcR57

I think using {% include %} within the template might be cleaner than rendering it to a string and then pushing it in context.

Please document new settings in settings settings section.

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-81db325a7c48bb6ea64cbacde390e79ef2ab4fbR266

I think it's better to let it to False by default, so that existing users do not open the regisrtation by accident, just upgrading coin.

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-81db325a7c48bb6ea64cbacde390e79ef2ab4fbR276

As there is already a ref template for the services, I'd suggest puting that new setting near to SUBSCRIPTION_REFERENCE in the settings file, naming it MEMBERSHIP_REFERENCE, and setting its default to ADH-{{ user.pk }}. For consistency

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-ea97584c864f0615fa686e09683d487d286bc33R2

Maybe we should inspire from other emails to have consistent wording/style among them. (I'm thinking about formulas/signature).

Thanks for reading :-)

General remark : for forms error displaying, there already is a bit of css for that, see members/password_reset/ view for example.

I'm very happy that you started using coin, and contributing to it. Thanks a lot for that one, opening online subscription might help a lot growing structures :-). It took me time to start that review, because… it's not a tiny contribution, and gogs does not make the review process specially comfy :-/ Feel free to discuss my remarks :-) Beside, I'd love to have another pair of eyes on that one. @opi @daimrod ? ## Functional review This workflows (self-registration) simplifies things. But maybe we should add some text at top or bottom of the form, stating that registering implies adhering to statuts/RI ? We have a *pending* status on members, what do you think about initializing the web-registered members with that pending status ? ## Technical review https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-4857e5838f3f748e6f5f7c7d54311a9234cf239R11 Weird spacing above the first arrow. https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-d7eda6505fce05fb529670de5746ab70a1cc135R10 2 blank lines is enough https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-d7eda6505fce05fb529670de5746ab70a1cc135R24 Maybe we should let the option to get that username auto-generated (like in `MemberCreationForm`). https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-d7eda6505fce05fb529670de5746ab70a1cc135R23 un-needed backslash https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-6622e551e4c325836ad255f65865d4bfc065f06R7 Libélé->libellé. I think this text is a bit too specific to your organization (mentioning *one* membership fee and *one* payment mean. Maybe this text goes too much into details for being a good default. **I'd like that other people give their opinion on that point**) You could use an ISP-specific template for that (see [doc](https://code.ffdn.org/FFDN/coin#customizing-templates)). (besides, I prefer `<strong>` over `<b>` but that… may just be nitpicking). https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-1274d2c9a3ed6ba9ce26b1961a5a7b63be2acfcR61 Prefer `render()` which use the simpler dict-based context. (`render_to_response` is on deprecation path.) https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-2a99361e7e2b07f615828b6e5d4592d24a40dbfR10 Unused import (actually, I don't see ExtraContextTemplateView used anywhere, but I may be missing it). https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-2a99361e7e2b07f615828b6e5d4592d24a40dbfR23 You could use decorator form, but that's a matter of preference, after all :-) https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-f08ea9e22c2c089b7a9e63f2894ea0bb5155004R47 I'd reword a bit the titles to make it clearer : - « C'est la première fois que vous vous connectez ? » - « Pas encore adhérent·e ? » Besides, even if registration is open, we want to display the first title also ; the member could have been registered by somenone else and don't know his/her password. https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-f08ea9e22c2c089b7a9e63f2894ea0bb5155004R52 Same as before, seems too specific to me. https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-4857e5838f3f748e6f5f7c7d54311a9234cf239R10 I would rephrase, being more generic : « si vous avez adhéré autrement que via ce formulaire en ligne ». https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-2a99361e7e2b07f615828b6e5d4592d24a40dbfR4 Unused import https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-1274d2c9a3ed6ba9ce26b1961a5a7b63be2acfcR61 Prefer `render()` (I know there are render_to_response in this very file, but that's from django old times, pre-render era ;-) https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-81db325a7c48bb6ea64cbacde390e79ef2ab4fbR272 I think we should either use a random string (let's be clear, that remains less good than choosing a local salt), or use None by default. I don't like puting joke in security parameters :-) https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-1274d2c9a3ed6ba9ce26b1961a5a7b63be2acfcR57 I think using `{% include %}` within the template might be cleaner than rendering it to a string and then pushing it in context. Please document new settings in [settings](https://code.ffdn.org/FFDN/coin/src/master/README.md#settings-1) settings section. https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-81db325a7c48bb6ea64cbacde390e79ef2ab4fbR266 I think it's better to let it to False by default, so that existing users do not open the regisrtation by accident, just upgrading coin. https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-81db325a7c48bb6ea64cbacde390e79ef2ab4fbR276 As there is already a ref template for the services, I'd suggest puting that new setting near to `SUBSCRIPTION_REFERENCE` in the settings file, naming it `MEMBERSHIP_REFERENCE`, and setting its default to `ADH-{{ user.pk }}`. For consistency https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-ea97584c864f0615fa686e09683d487d286bc33R2 Maybe we should inspire from [other emails](https://code.ffdn.org/FFDN/coin/src/master/coin/members/templates/members/emails/call_for_membership_fees.html) to have consistent wording/style among them. (I'm thinking about formulas/signature). Thanks for reading :-) General remark : for forms error displaying, there already is a bit of css for that, see *members/password_reset/* view for example.
ljf a commenté il y a 7 ans
Collaborateur

Maybe we should let the option to get that username auto-generated (like in MemberCreationForm).

Ok je te laisse voir pour ce point

https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-2a99361e7e2b07f615828b6e5d4592d24a40dbfR23 You could use decorator form, but that's a matter of preference, after all :-)

Je vois pas trop ce que tu veux dire, je connais pas le décorateur @form ... Je dois louper un truc.

> Maybe we should let the option to get that username auto-generated (like in MemberCreationForm). Ok je te laisse voir pour ce point > https://code.ffdn.org/FFDN/coin/pulls/106/files#diff-2a99361e7e2b07f615828b6e5d4592d24a40dbfR23 > You could use decorator form, but that's a matter of preference, after all :-) Je vois pas trop ce que tu veux dire, je connais pas le décorateur @form ... Je dois louper un truc.
Vinilox a commenté il y a 7 ans

Thank you for this.

It could be useful to have a mail notification when a new user register. Some sort of captcha or an hidden text field could be added to prevent bots from registering.

Thank you for this. It could be useful to have a mail notification when a new user register. Some sort of captcha or an hidden text field could be added to prevent bots from registering.
jocelyn a commenté il y a 7 ans
Propriétaire

@ljf petite relance, on en est où ?

@ljf petite relance, on en est où ?
jocelyn a commenté il y a 7 ans
Propriétaire

@ljf bumpybump :-)

@ljf bumpybump :-)
ljf a commenté il y a 6 ans
Collaborateur

La feature anti bot a été ajoutée.

Pour le mail, il y a déjà un mail de bienvenu, donc ça semble pas forcément opportun.

La feature anti bot a été ajoutée. Pour le mail, il y a déjà un mail de bienvenu, donc ça semble pas forcément opportun.
jocelyn a commenté il y a 6 ans
Propriétaire

Un an-et-demi après… fusionné !

J'ai ajouté un petit truc : un membre qui s'auto-enregistre aura un statut 'pending' au lieu de 'member'.

Un an-et-demi après… fusionné ! J'ai ajouté un petit truc : un membre qui s'auto-enregistre aura un statut 'pending' au lieu de 'member'.
Veuillez rouvrir cette Pull Request pour effectuer l'opération de fusion.
Connectez-vous pour rejoindre cette conversation.
Aucun jalon
Pas d'assignataire
3 Participants
Chargement…
Annuler
Enregistrer
Il n'existe pas encore de contenu.