Robert Schäfer
cfdf9dad2c
Merge pull request #1711 from Human-Connection/407-change_your_email_address
...
407 change your email address
2019-10-02 17:43:19 +02:00
mattwr18
f0d096fcab
Prefer guard clause to avoid database call
...
- follow @roschaefer 's PR review
2019-10-02 09:20:13 +02:00
roschaefer
1e31a0c620
fix: remove previous email address on change
...
This will allow you to change back to your previous email address: The
backend won't complain because of a user who owns that email address
already.
2019-10-02 01:55:14 +02:00
roschaefer
e6f8bbac9b
fix: remove copy+paste oversights
...
In the registration resolvers, it makes sense to immediately resolve if
an email address has been found (because you can re-send the
registration email).
In this case, we use the helper method only to trigger the `UserInputError`.
2019-10-02 01:54:28 +02:00
roschaefer
6ffafff288
fix: ensure no other user owns a new email address
...
`BELONGS_TO` means a user owns an email address. `PRIMARY_EMAIL` means a
user authenticates with that email.
So right now, you get a proper error message if you try to change your
email back to your old email address (because you own it already).
I will make sure to delete the old email so this will be no problem
anymore. But maybe in the future we might have multiple email addresses
per user and then it makes a big difference to use `PRIMARY_EMAIL` or
`BELONGS_TO`.
2019-10-02 01:31:23 +02:00
roschaefer
6a7970200f
refactor: EmailAddr.Request -> UnverifiedEmailAddr.
2019-10-02 01:21:56 +02:00
roschaefer
5848e6af18
Fix a TODO by @alina-beck
2019-10-02 00:54:01 +02:00
roschaefer
e116d52992
Use EmailAddressRequest and validate email
2019-10-02 00:54:01 +02:00
roschaefer
e51124f316
Resolvers for EmailAddress implemented
2019-10-02 00:54:01 +02:00
roschaefer
8c13234af9
Handle edge case
...
It might be that people try to register email addresses that they don't own. Then if the actual owner tries to add this email address, she should not get a unique constraint violation. Instead the email will be re-used.
Is this a security issue? Because we re-use the nonce? 🤔
2019-10-02 00:54:01 +02:00
roschaefer
73d5abd724
Implement AddEmail resolver
2019-10-02 00:54:01 +02:00
roschaefer
3b6cd55c0f
Implement unauthenticated part
2019-10-02 00:54:01 +02:00
roschaefer
8a05de5b2d
Sketch backend test to change Email Address
2019-10-02 00:54:01 +02:00
mattwr18
478f6fef1c
Fix query builder/test
2019-10-01 20:57:45 +02:00
mattwr18
8aa7f376b6
Update Post query for blockedByUsers
...
- Admin/Moderators see Posts even if they are blocked
2019-10-01 17:45:09 +02:00
aonomike
ff91cb231f
Refactor it clauses
2019-09-30 11:33:59 +03:00
aonomike
5bcfb06511
Make clearDatabase() await
2019-09-30 11:22:12 +03:00
aonomike
c427cb2b97
refactor the naming of variables
2019-09-28 00:31:08 +03:00
aonomike
53aa87ea3c
Test Unshouting of a post
...
- Tests passing individually but test suites failing
2019-09-25 21:44:47 +03:00
aonomike
4488008a2c
Test shouting other user's and current user's post
2019-09-25 01:11:18 +03:00
aonomike
33134c1d4f
Refactor shout spec
...
- Test unauthorized user path
2019-09-24 23:36:52 +03:00
roschaefer
c24876c922
Add a double-check just to be sure
2019-09-23 13:51:21 +02:00
roschaefer
c669fc08eb
Fix intermittent backend specs
...
@mattwr18 I still see those false positives. This should fix it.
2019-09-23 13:47:43 +02:00
mattwr18
865c562048
Fix intermittent failing test
...
- the test was regularly failing our build
- change from toEqual to toMatchObject since there is more info coming
back, like errors, etc...
2019-09-23 08:09:35 +02:00
Robert Schäfer
ede9dc0d76
Merge pull request #1620 from Human-Connection/1612_refactor-moderator-spec
...
1612 refactor moderator spec
2019-09-20 20:01:34 +02:00
roschaefer
1952d63b3c
Remove .only from moderation.spec.js
...
@aonomike @vbelolapotkov you made it!! You are the best.
Sure, the disable/enable can be improved by returning a union type. But
I leave that for another PR. 👍
2019-09-20 18:27:37 +02:00
Vasily Belolapotkov
7cca60358c
remove FollowTypeEnum from schema
2019-09-20 16:52:12 +03:00
aonomike
347f37efe4
Add enable resources test path
2019-09-20 14:23:39 +03:00
Robert Schäfer
7759d1b98a
Merge pull request #1647 from Human-Connection/Provider_list_approval_hard_cut
...
Provider list approval hard cut
2019-09-19 19:56:01 +02:00
ogerly
b75ebfd004
edit providerlist + test all provider
2019-09-19 18:46:44 +02:00
Robert Schäfer
d830fa4ae4
Merge pull request #1596 from Human-Connection/1583-follow-mutation
...
Improve follow/ufollow mutation
2019-09-19 16:54:35 +02:00
aonomike
8f2456aec4
Test unauthanticated enable
2019-09-19 17:01:42 +03:00
Wolfgang Huß
1fe4ae6619
Merge pull request #1599 from Human-Connection/configure-emails
...
Configure emails
2019-09-19 11:21:18 +02:00
Alina Beck
e843edeb13
unite email templates in templateBuilder
2019-09-19 01:15:52 +01:00
aonomike
bdfc2127d5
fix code review issues
2019-09-18 22:29:14 +03:00
aonomike
ca970eb30a
Refactor disable post updates disabled
2019-09-18 17:59:29 +03:00
aonomike
e109b5f6b1
Refactor disable post updates disabledBy
2019-09-18 17:51:35 +03:00
aonomike
84c1d8ef25
Refactor to eliminate duplicate code and start implementing refactor for Post
2019-09-18 17:31:24 +03:00
ogerly
75ea8eaaf0
Provider list approval hard cut
2019-09-18 14:03:51 +02:00
mattwr18
e89aff1272
Fix bug where about must not be empty string
...
- add test case to test this use case since it is the default from our
UI
2019-09-18 13:09:33 +02:00
Vasily Belolapotkov
7d048b029d
return user from follow/unfollow mutation
2019-09-18 09:49:59 +03:00
aonomike
3e7e240392
Refactor it updates disabled test for Comment
2019-09-17 18:59:21 +03:00
roschaefer
a8dded2263
Fix #1616
2019-09-17 17:47:26 +02:00
aonomike
5c06ba39e2
Refactor moderate Comment tests
2019-09-17 18:46:45 +03:00
aonomike
a6f4362a3f
Refactor Moderator spec tp use apollo-server-testing
...
- Refactor unauthentiacted path for logged in and un logged in user
2019-09-17 15:51:49 +03:00
Vasily Belolapotkov
eeee5f8e9b
refactor graphQL queries in follow spec
2019-09-17 10:50:03 +03:00
Vasily Belolapotkov
9b970dae15
refactor follow resolver spec
2019-09-16 13:54:00 +03:00
mattwr18
bec629e8ef
Fix intermittent failing test
...
- not concerned about the order of the notification in this test
2019-09-13 20:51:15 +02:00
mattwr18
d1ecac4580
Write tests to ensure createdAt is not deleted on update
...
- we had a silly serious bug by overwriting all attributes at the time
of UpdatePost
- tests in place to ensure we don't accidentally delete our createdAt
attribute
2019-09-13 20:14:47 +02:00
mattwr18
60c473bb94
Create UpdateComment resolver, update UpdateUser
...
- UpdateUser should update updatedAt at point of insertion in the
database as well
2019-09-13 20:14:47 +02:00