Diff for "Teams/Ams-Hackers/WP1"

Differences between revisions 5 and 6
Revision 5 as of 2017-11-24 08:55:39
Size: 5172
Editor: jonas
Comment:
Revision 6 as of 2017-11-24 09:04:42
Size: 6608
Editor: jonas
Comment:
Deletions are marked like this. Additions are marked like this.
Line 44: Line 44:
 ** Has the button "Support" leading to my.fsfe.org:/signup   * Has the button "Support" leading to my.fsfe.org:/signup
Line 47: Line 47:
 ** Has the options, "Volunteer" leading to :/signup/volunteer, "Supporter" leading to :/signup/supporter   * Has the options, "Volunteer" leading to :/signup/volunteer, "Supporter" leading to :/signup/supporter
Line 50: Line 50:
 ** person.purpose = 'a'
 ** form contains name and email
 ** upon submit, create user
  * person.purpose = 'a'
  * form contains name and email
  * upon submit, create user
Line 55: Line 55:
 ** person.purpose = 'x'
 ** form contains name and email
 ** upon submit, create user
  * person.purpose = 'x'
  * form contains name and email
  * upon submit, create user
Line 75: Line 75:

 * my.fsfe.org:/settings
  * If the user doesn't have a login name set, then this page should have a box at the top with information: "You don't have a username or password set, if you'd like to create one for future logins, or to login to FSFE services, click [here]"
  * Else, this page should have the fields:
   * Full name
   * Title
   * Birth date
   * Primary email
   * Secondary email
   * Address
   * Zip code
   * City
   * Country
   * Opt-in for newsletter
  * There should also be a link somewhere with "contribution" which leads to my.fsfe.org:/settings/contribute
  * And a link with "change password" which leads to my.fsfe.org:/settings/password


 * my.fsfe.org:/settings/login
  * Allow the user to set a login name if they don't have one already
   * If the user HAS a login name, it should be possible to change it, but with BIG WARNINGS saying that if they change the login, they will lose access to any data associated with the old login name
   * If the user doesn't have a login name, they can of course enter and set one, after which they should be redirected to my.fsfe.org:/settings/password to also set a password for it.

 * my.fsfe.org:/settings/password
  * Fields to set password. Take note that if the user doesn't *have* a password (for instance because it's a new user and they haven't set one yet), then they shouldn't be asked for their old password :) just a new one.

Milestones

1 - Integrate fsfe-cd with "fsfe-cd"

Current fsfe-cd implement its own SQLAlchemy mapping by mimicing what it sees in the database. There's a newer and more complete SQLAlchemy mapping for the same database which we have here: https://git.fsfe.org/fsfe-ams/supporterdb/src/master/fsfe_cd/mapping.py We would like to integrate these so they use the same mapping. The advantage would be that if we do, then the new mapping.py has all the support which is needed to not only read but also change database fields, and knows what to do when some fields are changes (send email to inform about changes, etc).

So this milestone would be complete when fsfe-cd uses the mapping.py from supporterdb instead of its own.

2 - Present settings in settings view

When this work is completed, someone can login to https://my.fsfe.org/ and see their current settings, address, etc, retrieved from the fellowship database. This requires implementing an API call from ams-front to http://fsfe-cd/api/fellows/ to get the information relevant, and fsfe-cd needs to be passed appropriate authentication parameters with it (taken from the User object of the logged in user, specifically the access code and id token).

The parameters which should be published and be able to be viewed in this pane include:

  • Email
  • Backup email
  • Title
  • Full name
  • Street address
  • Post code
  • City
  • Country (select box)
  • Language
  • Birth date
  • Opt-in to communication from the FSFE (checkbox)

3 - Change settings in settings view

When work on this milestone is completed, it's possible to not only view the information in the settings page, but also change it. The same settings as those in milestone 2 should be changeable. This requires implementing a new view in fsfe-cd to handle changing data. When an API call to change information is received, the updates should be made (can be done directly, since at this point the integration of the new mapping from 1 is done).

4 - Account registration

When this milestone is complete, it's possible to sign up to make a one time or regular donation or create a new volunteer account via the http://my.fsfe.org/ website. The forms are largely there already. but the processes will look a bit different:

  • When signing up as a volunteer, the form is in register/volunteer.html (but please REMOVE any mention of local groups or teams to join here. let's keep it simple).
  • When signing up as a supporter (financial contributor, even one time or regular), the form is in supporter/form (here too, remove local groups and teams).

When a form is processed, it should call fsfe-cd with the data provided, and fsfe-cd should use the functions from the new mapping.py to create the relevant objects.

When creating an account, it's vital to check if an account with that email already exists! If it does, the user should be given a notice about this and be asked to login using email. This doesn't apply to one time donors though; if an entry exist for one time donations, we should simply call the executable with the new information and the executable will deal with matching this to the existing account.

Workflow

  • my.fsfe.org:/
    • Has the button "Support" leading to my.fsfe.org:/signup
  • my.fsfe.org:/signup
    • Has the options, "Volunteer" leading to :/signup/volunteer, "Supporter" leading to :/signup/supporter
  • my.fsfe.org:/signup/volunteer
    • person.purpose = 'a'
    • form contains name and email
    • upon submit, create user
  • my.fsfe.org:/signup/supporter
    • person.purpose = 'x'
    • form contains name and email
    • upon submit, create user

The mail sent when person.purpose = 'x' should contain a one-time login link to the website, with the message "to continue your registration, click here". The login link should be created the same way as when someone clicks to login with an email link on https://my.fsfe.org/login/email/ The link should direct the user to a page my.fsfe.org:/settings/contribute:

  • my.fsfe.org:/settings/contribute
    • if person.purpose == 'x', or person.purpose == 'o' then:
      • form contains two boxes:
      • "Make a one-time donation" with only contribution amount.
      • "Setup a recurring donation": with period (monthly, yearly) and amount.
      • Filling in an amount and clicking OK should set person.purpose = 'o' if it's a one time donation, and person.purpose = 'd' else, and then redirect the user to our payment pages (just make a dummy redirect for now).
    • if person.purpose is 'd'
      • form contains two boxes:
      • "Make a one-time donation" with only contribution amount.
      • "Change your recurring donation": with period (monthly, yearly) and amount. (with a warning that changing the recurring donation isn't automatic, and the user will be notified when the change is done)
      • Filling in an amount and clicking OK on a one-time donation should redirect the user to our payment pages (just make a dummy redirect for now).
      • Filling in a change to the recurring donation should trigger an email being sent to contact@fsfe.org with the new details

  • my.fsfe.org:/settings
    • If the user doesn't have a login name set, then this page should have a box at the top with information: "You don't have a username or password set, if you'd like to create one for future logins, or to login to FSFE services, click [here]"
    • Else, this page should have the fields:
      • Full name
      • Title
      • Birth date
      • Primary email
      • Secondary email
      • Address
      • Zip code
      • City
      • Country
      • Opt-in for newsletter
    • There should also be a link somewhere with "contribution" which leads to my.fsfe.org:/settings/contribute
    • And a link with "change password" which leads to my.fsfe.org:/settings/password
  • my.fsfe.org:/settings/login
    • Allow the user to set a login name if they don't have one already
      • If the user HAS a login name, it should be possible to change it, but with BIG WARNINGS saying that if they change the login, they will lose access to any data associated with the old login name
      • If the user doesn't have a login name, they can of course enter and set one, after which they should be redirected to my.fsfe.org:/settings/password to also set a password for it.
  • my.fsfe.org:/settings/password
    • Fields to set password. Take note that if the user doesn't *have* a password (for instance because it's a new user and they haven't set one yet), then they shouldn't be asked for their old password :) just a new one.