6031 Commits

Author SHA1 Message Date
roschaefer
56ce95a6fd refactor: follow review of @alina-beck + @mattwr18 2019-10-02 15:50:35 +02:00
mattwr18
263b7d0aea Fix lint 2019-10-02 10:11:39 +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
7bec48904e refactor: improve language of validation message 2019-10-02 01:14:57 +02:00
roschaefer
4ac80b0d58 refactor: align submit buttons consistently
@alina-beck said we have most buttons left-aligned, so I went with that:
https://github.com/Human-Connection/Human-Connection/pull/1711#discussion_r329505767

Also this uses icon `envelope` for emails. This makes sense, because we
could use icon `at` for slugs.
2019-10-02 01:10:28 +02:00
roschaefer
15e3a5690c refactor: change all hyphenated spellings to email 2019-10-02 00:58:23 +02:00
roschaefer
01e583b45e Translate backend error and avoid $toast 2019-10-02 00:54:01 +02:00
roschaefer
5848e6af18 Fix a TODO by @alina-beck 2019-10-02 00:54:01 +02:00
roschaefer
76841d27f1 Styling 2019-10-02 00:54:01 +02:00
roschaefer
573edce788 Show at least the error message in SSR 2019-10-02 00:54:01 +02:00
roschaefer
3e3452c7bc Better help messages, styling 2019-10-02 00:54:01 +02:00
roschaefer
69cd41d3eb Test email verification page 2019-10-02 00:54:01 +02:00
roschaefer
6a212fb668 Test verify-nonce page 2019-10-02 00:54:01 +02:00
roschaefer
f61441d3e6 Test my-email-address settings page 2019-10-02 00:54:01 +02:00
roschaefer
e116d52992 Use EmailAddressRequest and validate email 2019-10-02 00:54:01 +02:00
Alina Beck
707cf741de write text for verification email 2019-10-02 00:54:01 +02:00
roschaefer
2b490e00d7 wrap email templates in standard layout to minimize duplicate code 2019-10-02 00:54:01 +02:00
roschaefer
89cc6da5f1 Don't redirect if email change was not successful 2019-10-02 00:54:01 +02:00
roschaefer
9808e1c4f8 Validate different email address 2019-10-02 00:54:01 +02:00
roschaefer
69542617ac Split routes in two
So, to get a direct link it's better to have one route that calls a
mutation as soon as it is visited.
2019-10-02 00:54:01 +02:00
roschaefer
0592f685f6 Basic email change works 2019-10-02 00:54:01 +02:00
roschaefer
80ce079920 Implement first page to change email address 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
Robert Schäfer
5d5540d8c8
Merge pull request #1779 from Human-Connection/dependabot/npm_and_yarn/backend/metascraper-audio-5.7.6
Bump metascraper-audio from 5.7.5 to 5.7.6 in /backend
2019-10-01 23:46:07 +02:00
Robert Schäfer
b31126c391
Merge pull request #1701 from Human-Connection/1273-fix-post-page-nav
fix the bug with scrolling post comments into view
2019-10-01 23:17:53 +02:00
dependabot-preview[bot]
c3e7b3938a
Bump metascraper-audio from 5.7.5 to 5.7.6 in /backend
Bumps [metascraper-audio](https://github.com/microlinkhq/metascraper) from 5.7.5 to 5.7.6.
- [Release notes](https://github.com/microlinkhq/metascraper/releases)
- [Changelog](https://github.com/microlinkhq/metascraper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/microlinkhq/metascraper/compare/v5.7.5...v5.7.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-01 21:10:18 +00:00
Robert Schäfer
7ecb9d8bed
Merge pull request #1778 from Human-Connection/dependabot/npm_and_yarn/backend/metascraper-publisher-5.7.6
Bump metascraper-publisher from 5.7.4 to 5.7.6 in /backend
2019-10-01 23:07:09 +02:00
dependabot-preview[bot]
30ea40a8a9
Bump metascraper-publisher from 5.7.4 to 5.7.6 in /backend
Bumps [metascraper-publisher](https://github.com/microlinkhq/metascraper) from 5.7.4 to 5.7.6.
- [Release notes](https://github.com/microlinkhq/metascraper/releases)
- [Changelog](https://github.com/microlinkhq/metascraper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/microlinkhq/metascraper/compare/v5.7.4...v5.7.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-01 15:52:40 +00:00
Robert Schäfer
da9ddf1040
Merge pull request #1780 from Human-Connection/dependabot/npm_and_yarn/backend/eslint-6.5.1
Bump eslint from 6.4.0 to 6.5.1 in /backend
2019-10-01 17:51:28 +02:00
roschaefer
24b2cab473 fix: handle edge case noticed by @vbelolapotkov 2019-10-01 17:51:16 +02:00
roschaefer
08e73747bd refactor: set global defaults of vue-scrollto 2019-10-01 17:51:16 +02:00
Robert Schäfer
809bb7cc30
Merge pull request #1782 from Human-Connection/dependabot/npm_and_yarn/backend/metascraper-url-5.7.6
Bump metascraper-url from 5.7.5 to 5.7.6 in /backend
2019-10-01 17:51:09 +02:00
Robert Schäfer
540d41cd75
Merge pull request #1783 from Human-Connection/dependabot/npm_and_yarn/backend/metascraper-logo-5.7.6
Bump metascraper-logo from 5.7.5 to 5.7.6 in /backend
2019-10-01 17:50:52 +02:00
roschaefer
db1bcdd3d2 refactor: register vue-scrollto in nuxt.config.js
This will allow us to use this.$scrollTo in components. I'm now also
using this in the mixin. With so many `this`s it gets horribly
difficult to properly test the mixin in isolation. So I decided to test
the mixin on the component directly.
2019-10-01 17:25:28 +02:00
roschaefer
9da40c4895 fix: avoid many scrollTo calls for n components
Thank you @vbelolapotkov for pointing out the flaws here:
https://github.com/Human-Connection/Human-Connection/pull/1756#discussion_r329361572

So here is my attempt to fix it:
* Install `vue-scrollto` which relies on `requestAnimationFrame`
  - apparently this is better on Safari and IE? 🤔
  - Mocking out entire modules is easier in jest:
    https://jestjs.io/docs/en/bypassing-module-mocks
* Require `checkAnchor` to be implemented on the component
2019-10-01 11:55:18 +02:00
mattwr18
13ba93eecd
Merge pull request #1781 from Human-Connection/dependabot/npm_and_yarn/backend/graphql-middleware-4.0.1
Bump graphql-middleware from 3.0.5 to 4.0.1 in /backend
2019-10-01 10:32:04 +02:00
dependabot-preview[bot]
6c6fdcc951
Bump metascraper-logo from 5.7.5 to 5.7.6 in /backend
Bumps [metascraper-logo](https://github.com/microlinkhq/metascraper) from 5.7.5 to 5.7.6.
- [Release notes](https://github.com/microlinkhq/metascraper/releases)
- [Changelog](https://github.com/microlinkhq/metascraper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/microlinkhq/metascraper/compare/v5.7.5...v5.7.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-01 08:27:41 +00:00
dependabot-preview[bot]
345bec59be
Bump metascraper-url from 5.7.5 to 5.7.6 in /backend
Bumps [metascraper-url](https://github.com/microlinkhq/metascraper) from 5.7.5 to 5.7.6.
- [Release notes](https://github.com/microlinkhq/metascraper/releases)
- [Changelog](https://github.com/microlinkhq/metascraper/blob/master/CHANGELOG.md)
- [Commits](https://github.com/microlinkhq/metascraper/compare/v5.7.5...v5.7.6)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-01 08:27:27 +00:00
mattwr18
96ac4ba4d3
Merge pull request #1777 from Human-Connection/dependabot/npm_and_yarn/backend/metascraper-youtube-5.7.6
Bump metascraper-youtube from 5.7.5 to 5.7.6 in /backend
2019-10-01 10:26:33 +02:00
mattwr18
857c2228ec
Merge pull request #1776 from Human-Connection/dependabot/npm_and_yarn/backend/babel/preset-env-7.6.2
Bump @babel/preset-env from 7.6.0 to 7.6.2 in /backend
2019-10-01 10:26:19 +02:00
mattwr18
0dd66b9675
Merge pull request #1775 from Human-Connection/dependabot/npm_and_yarn/backend/metascraper-soundcloud-5.7.6
Bump metascraper-soundcloud from 5.7.4 to 5.7.6 in /backend
2019-10-01 10:25:37 +02:00
dependabot-preview[bot]
8829b37df8
Bump eslint from 6.4.0 to 6.5.1 in /backend
Bumps [eslint](https://github.com/eslint/eslint) from 6.4.0 to 6.5.1.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v6.4.0...v6.5.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-01 08:24:47 +00:00
mattwr18
0c010e77a1
Merge pull request #1774 from Human-Connection/dependabot/npm_and_yarn/backend/metascraper-author-5.7.6
Bump metascraper-author from 5.7.4 to 5.7.6 in /backend
2019-10-01 10:24:44 +02:00