51 Commits

Author SHA1 Message Date
Wolfgang Huß
4a732beb0a Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1710-list-and-protocol-moderation 2019-11-18 07:59:44 +01:00
roschaefer
c6e4c38de8 build(deps): remove deprecated debug flags
I deprecated the debug flags myself here:
https://github.com/neo4j-graphql/neo4j-graphql-js/pull/288

You can now debug the queries run by `neo4j-graphql-js` by starting
the backend like this:

```bash
DEBUG=neo4j-graphql-js yarn run backend
```
2019-11-14 14:22:20 +01:00
Wolfgang Huß
913fcc2cdb Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1710-list-and-protocol-moderation
# Conflicts:
#	backend/src/schema/index.js
#	webapp/locales/pt.json
2019-11-14 09:41:00 +01:00
mattwr18
b38fde0fd0 Fix production error "User.locale" returned undefined 2019-11-13 18:00:35 +01:00
Wolfgang Huß
54be7782ba First refactoring tests to new database structure 2019-10-30 16:59:24 +01:00
Wolfgang Huß
6593c6ec5c Refactor the database structure from DISABLED to DECIDED relation
- First Step.
- Apply properties to the relation.
2019-10-25 16:51:47 +02:00
Alexander Friedland
39b3d71be4
Merge branch 'master' into Allow_embedded_code_in_posts_permanent_memory 2019-10-07 10:35:04 +02:00
mattwr18
f0d096fcab Prefer guard clause to avoid database call
- follow @roschaefer's PR review
2019-10-02 09:20:13 +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
ogerly
044e2bfed9 Allow embedded code in posts permanent in database 2019-09-23 20:08:45 +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
ogerly
4b97131225 old stand 2019-09-12 16:37:30 +02:00
mattwr18
4e065325d1
Merge pull request #1480 from Human-Connection/cleanup_unused_code
Remove a lot of unused code, reduce graphql schema
2019-09-05 08:03:39 +02:00
roschaefer
66ed78e19b Remove a lot of unused code, reduce graphql schema 2019-09-05 03:20:32 +02:00
roschaefer
38ea74379a If TAC version is missing, return null 2019-09-05 01:24:51 +02:00
mattwr18
b04649e1ee Remove duplicate code
- there was the same methods in user.js and user_management.js except
that the login was not filtering out deleted users, so it was failing
one test. Reverted changes back to the user.js from the master branch...
added back our changes.

Co-authored-by: Tirokk <wolle.huss@pjannto.com>
Co-authored-by: ogerly <fridolin@tutanota.com>
2019-09-04 19:31:43 +02:00
ogerly
948982682d fails, fails, fails 2019-09-04 10:09:20 +02:00
Alexander Friedland
e618ff005d
Merge branch 'master' into C-1187-terms-and-conditions-confirmed-function 2019-09-04 06:42:40 +02:00
roschaefer
0b3bbb1f14 Delete post.title and obfuscate slug 2019-09-03 21:28:29 +02:00
roschaefer
bd885b1aac Delete emails and social media, bugfix
The bugfix was missing '(' plus a wrong order for the social media
relationship called 'OWNED_BY'.
2019-09-03 21:28:29 +02:00
roschaefer
491a626031 Replace deleteComment with a more KISS solution 2019-09-03 21:28:29 +02:00
roschaefer
c4ba2c4aeb SoftDeleteMiddleware obfuscates deleted resources 2019-09-03 21:28:29 +02:00
Alexander Friedland
41767cc27e
Merge branch 'master' into C-1187-terms-and-conditions-confirmed-function 2019-09-03 09:51:12 +02:00
ogerly
1b9303ceaf Jest tests for the Terms and Conditions in frontend and backend 2019-09-03 09:46:18 +02:00
roschaefer
e4d57f80aa Fix #1333
Ok, so here are multiple issues:
1. In cypher, `NOT NULL` will return `NULL` not `FALSE`. If we want
`FALSE` to be set in the database import, we should use `COAELESCE`
to find the first not-null value.
See:
https://neo4j.com/docs/cypher-manual/current/syntax/working-with-null/
https://markhneedham.com/blog/2017/02/22/neo4j-null-values-even-work/

2. I removed the `disabled` and `deleted` checks on the commented
counter. With `neo4j-graphql-js` it is not possible to filter on the
join models (at least not without a lot of complexity) for disabled or
deleted items. Let's live with the fact that the list of commented posts
will include those posts, where the user has deleted his comment or where
the user's comment was disabled. It's being displayed as "not available"
so I think this is OK for now.

3. De-couple the pagination counters from the "commented", "shouted"
etc. counters. It might be that the list of posts is different for
different users. E.g. if the user has blocked you, the "posts" list
will be empty. The "shouted" or "commented" list will not have the
posts of the author. If you are a moderator, the list will include
disabled posts. So the counters are not in sync with the actual list
coming from the backend. Therefore I implemented "fetch and check if
resultSet < pageSize" instead of a global counter.
2019-08-28 12:57:32 +02:00
ogerly
36ce6361ec Alle Daten übernommen die für serverseitig rendern nötig sind 2019-08-23 11:02:24 +02:00
Matt Rider
dbaa8e687f Fix vue warnings, fix tests, refactor
- was throwing an error when trying to update commentsCount because of new implementation by @roschaefer which uses countResolver, but there was no related for commentsCount, it was r... also commentsCount is no longer needed anywhere in the code base, it is commentedCount now
2019-08-16 13:28:55 +02:00
Robert Schäfer
5fb60d1132 Implement+test blocking a user on backend 2019-08-13 11:05:29 +02:00
Robert Schäfer
7f509b3201 Implement block/unbock UI 2019-08-13 11:05:29 +02:00
Robert Schäfer
293054a05b Implement block+unblock basic features 2019-08-13 11:05:29 +02:00
Robert Schäfer
700bdcb8f1 Implement+test unblock mutation 2019-08-13 11:05:29 +02:00
Robert Schäfer
f5a59568ab Implement block except for the unfollow feature 2019-08-13 11:05:29 +02:00
Robert Schäfer
05aee24efd Implement+test User.blockedUsers resolver 2019-08-13 11:05:29 +02:00
Robert Schäfer
f8b37b5c1e Remove obsolete relationship 'BLACKLISTED' 2019-08-13 11:05:29 +02:00
Robert Schäfer
e1bb6ed74e Fix lint 2019-08-02 01:45:36 +02:00
Robert Schäfer
c65cc3e0e5 Implement+test SocialMedia.ownedBy resolver
Explicitly define `SocialMedia` graphql type and exclude it from
`neo4j-graphql-js`.
2019-07-31 18:07:48 +02:00
Robert Schäfer
448706ab18 Merge remote-tracking branch 'origin/master' into refactor-social-media-backend 2019-07-31 17:36:02 +02:00
Alina Beck
d83819dae3 add social media back into user resolver 2019-07-29 23:19:09 +02:00
Alina Beck
355c7c764c remove social media from user resolver 2019-07-29 17:20:36 +02:00
Robert Schäfer
4ee20d4e7e Coerce undefinedToNull in embed resolver 2019-07-22 00:38:56 +02:00
Robert Schäfer
b8ab7cacef Fix email filter test 2019-07-15 19:21:17 +02:00
Robert Schäfer
cec3eddcef Fix more test cases 2019-07-15 18:35:38 +02:00
Robert Schäfer
dacc3bb557 Implement fallback User.email resolver 2019-07-15 18:35:38 +02:00
Robert Schäfer
95a06a8344 Refactor all badges resolvers to use neode
FYI: @Tirokk I think we'll never remove or add new badges through
graphql. Instead, we will seed them manually with direct access to the
database. Therefore I removed the respective mutations and also your
tests regarding permissions.
2019-07-10 14:36:42 +02:00
Robert Schäfer
10ae4abaae Use neode to bring User mutations under control
This commit takes all backend changes for signup and invite feature. I
was working on these features and removed the generated mutations for
type user along the way.
2019-07-03 15:58:42 +02:00
Matt Rider
d15857d240 Set user's posts/comments' delete attribute to true
- favor over actually deleting the node so that the comments will appear as anonymous and not lose the context of the conversation
- the post will not appear, but for admin it will be accessible
- follow @roschaefer `PR` review
2019-06-12 15:27:57 -03:00
Matt Rider
f7b2d52a7e Refactor resolver to use Promise and map
- forEach cannot be used with async/await
2019-06-07 15:58:51 -03:00
Matt Rider
ed5f14d052 Dry out resolver 2019-06-07 10:17:58 -03:00
Matt Rider
bf352dca92 Start backend implementation UserAccount Deletion 2019-06-06 17:28:52 -03:00