Diff for "Teams/Ams-Hackers/WP1"

Differences between revisions 2 and 3
Revision 2 as of 2017-11-09 15:51:15
Size: 2679
Editor: jonas
Comment:
Revision 3 as of 2017-11-09 16:23:33
Size: 3212
Editor: jonas
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
== 1 - Login username/password flow (DONE) == == 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.
Line 23: Line 27:
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 entire data object should be wrapped in a json structure and an executable called with this information on stdin. That executable is then responsible for actually doing the change in the database. 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).
Line 31: Line 35:
When a form is processed, it should call fsfe-cd with the data provided, and fsfe-cd in turn should wrap this in a JSON structure and call an executable (which I'll provide). The API
c
alls in fsfe-cd need to be adapted for this.
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.

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.