Commit Graph

572 Commits

Author SHA1 Message Date
Maciej Ziarkowski
a49b04f1aa Add time to data extract file name 2019-08-30 14:11:25 +01:00
Maciej Ziarkowski
3724d74217 Add data extracts frontend 2019-08-30 13:45:55 +01:00
Maciej Ziarkowski
3494b13dd4 Add first TSLint rule 2019-08-29 17:54:50 +01:00
Maciej Ziarkowski
6733d02876 Add data extract controllers and routes 2019-08-29 17:54:08 +01:00
Maciej Ziarkowski
1008c09905 Add data extract service 2019-08-29 17:53:48 +01:00
Maciej Ziarkowski
9e62d4c114 Move asyncController calls to controller files 2019-08-29 17:52:30 +01:00
Maciej Ziarkowski
ff640451be Add crontab file for data extract 2019-08-29 13:17:33 +01:00
Maciej Ziarkowski
be13cd94f5 Add data extract maintenance script 2019-08-29 13:17:09 +01:00
Maciej Ziarkowski
0dee6ae167 Add data migrations for bulk extracts 2019-08-29 12:01:41 +01:00
Tom Russell
2127521094
Merge pull request #392 from mz8i/feature/63-delete-account-frontend
Feature 63: delete user account (frontend code)
2019-08-23 12:43:53 +01:00
Tom Russell
a35289d9b8
Merge branch 'master' into feature/63-delete-account-frontend 2019-08-23 12:42:03 +01:00
Tom Russell
df902d21a2
Merge pull request #399 from mz8i/feature/61-forgotten-password
Feature 61: forgotten password
2019-08-23 12:39:41 +01:00
Maciej Ziarkowski
a3ab275378 Remove nested state from ForgottenPassword 2019-08-22 14:48:51 +01:00
Maciej Ziarkowski
072128268c Add frontend for forgotten password 2019-08-22 14:40:38 +01:00
Maciej Ziarkowski
2791e7673d Rename tsx file to follow naming convention 2019-08-22 10:48:37 +01:00
Maciej Ziarkowski
6d4c514c00 Remove always failing error commited accidentally 2019-08-22 10:29:40 +01:00
Maciej Ziarkowski
2622269f77 Add global error handler 2019-08-21 14:47:44 +01:00
Maciej Ziarkowski
4d27c3b889 Add controller and route for password reset 2019-08-21 14:47:23 +01:00
Maciej Ziarkowski
fc2666364d Add backend services for password reset 2019-08-21 14:46:14 +01:00
Maciej Ziarkowski
4259778224 Add email service and config template 2019-08-21 14:42:27 +01:00
Maciej Ziarkowski
9c67b46f02 Add password reset token database migrations 2019-08-21 14:20:53 +01:00
Maciej Ziarkowski
54bd565cc8 Split /users into routes/controller/service 2019-08-19 14:31:35 +01:00
Maciej Ziarkowski
28ffdcf19e Improve modal popup CSS 2019-08-16 15:40:38 +01:00
Maciej Ziarkowski
4ad62eb196 Add simple CSS to show/hide modal 2019-08-16 15:20:54 +01:00
Maciej Ziarkowski
423f35958d Add delete account action to my-account page 2019-08-16 13:21:12 +01:00
Maciej Ziarkowski
d54cc5df41 Add ConfirmationModal component 2019-08-16 13:20:44 +01:00
Maciej Ziarkowski
90da2a1522 Add user delete API endpoint
The deleted user username will be changed to 'deleted_'
plus the 13 initial characters of the standard format user_id.
Email, hashed password and API key are all cleared for the user.
The endpoint is currently only available through /api/users/me
and only allows a logged-in user to delete their own account.
2019-08-16 11:12:18 +01:00
Maciej Ziarkowski
1901ebad42 Add user delete database migrations
Apart from adding the delete-related columns, this migration replaces
the existing unique constraint on the username with a unique index
which has a WHERE clause, so that deleted usernames need not be unique.
This is to avoid having to implement a special function for generating
unique IDs just to keep the deleted username unique and under 30 chars.
The deleted username can still use e.g. the initial part of the user_id
but the uniqueness is not required.
2019-08-16 11:12:18 +01:00
Tom Russell
cb64457cca
Merge pull request #386 from mz8i/feature/383-refactor-routes
Refactor API and modify routes
2019-08-16 11:11:39 +01:00
mz8i
b5b72e7152
Switch from express app to router in API
Co-Authored-By: Tom Russell <tomalrussell@gmail.com>
2019-08-16 10:57:15 +01:00
Maciej Ziarkowski
185a94b5cb Add user delete API endpoint
The deleted user username will be changed to 'deleted_'
plus the 13 initial characters of the standard format user_id.
Email, hashed password and API key are all cleared for the user.
The endpoint is currently only available through /api/users/me
and only allows a logged-in user to delete their own account.
2019-08-15 16:12:01 +01:00
Maciej Ziarkowski
5336f65ca4 Add user delete database migrations
Apart from adding the delete-related columns, this migration replaces
the existing unique constraint on the username with a unique index
which has a WHERE clause, so that deleted usernames need not be unique.
This is to avoid having to implement a special function for generating
unique IDs just to keep the deleted username unique and under 30 chars.
The deleted username can still use e.g. the initial part of the user_id
but the uniqueness is not required.
2019-08-15 16:08:36 +01:00
Maciej Ziarkowski
8b78a74874 Remove unnecessary form action/method
The forms calling the API had an unnecessary form action and method.
This is because the forms have an onSubmit hook calling preventDefault.
The attributes were removed to avoid confusion.
2019-08-15 12:19:43 +01:00
Maciej Ziarkowski
6f4dfa2227 Handle invalid URLs with the frontend 404 page 2019-08-14 14:17:47 +01:00
Maciej Ziarkowski
be564dccea Add JSON API 404 handler 2019-08-14 14:13:14 +01:00
Maciej Ziarkowski
2c9b5ea3d8 Modify routes, refactor API structure 2019-08-14 14:05:49 +01:00
Maciej Ziarkowski
021578a2d8 Merge branch 'master' into feature/383-refactor-routes 2019-08-14 13:28:21 +01:00
Maciej Ziarkowski
a2394ef962 Move JSON API into its own directory 2019-08-14 10:54:13 +01:00
mz8i
47f4cacb3f Add draft privacy policy
Closes #323 via #381
2019-08-13 21:20:20 +01:00
mz8i
f359d1c2d9 Add contributor agreement
Closes #317 via #382
2019-08-13 21:17:39 +01:00
Tom Russell
7d7c22ba98 Return empty string (not null) if user doesn't like building
Towards #364
2019-08-12 22:04:45 +01:00
Tom Russell
6cfd12e638 Minor updates to npm packages 2019-08-12 21:57:44 +01:00
Tom Russell
00bc2ef722
Merge pull request #378 from mz8i/feature/372-fix-info-links
Fix info links
2019-08-12 21:41:59 +01:00
Tom Russell
f240681816
Merge pull request #379 from mz8i/feature/371-change-section-title
Change energy to sustainability
2019-08-12 21:39:55 +01:00
Maciej Ziarkowski
3cb853b90d Change energy to sustainability 2019-08-12 17:57:01 +01:00
Maciej Ziarkowski
822217e594 Fix info links 2019-08-12 16:46:45 +01:00
Tom Russell
ab14d2af25
Merge pull request #369 from mz8i/feature/typescript
Move code base to TypeScript
2019-08-12 10:53:18 +01:00
Maciej Ziarkowski
7b0d305ba7 Fix ES to TS module import errors 2019-08-12 10:24:38 +01:00
Maciej Ziarkowski
fb70b2bf64 Configure Jest for TS 2019-08-12 10:24:08 +01:00
Maciej Ziarkowski
4421930942 Squash TypeScript errors and fix bugs
Most errors highglighted by TS were due to a lack of type definitions
and were ignored by settings types to `any`.
Some minor bugs were resolved where the fix was obvious.
TODO marks left where `any` needs to be later removed or bugfix verified
2019-08-09 18:49:43 +01:00