70 Commits

Author SHA1 Message Date
mattwr18
ba3e9e1025 Rename blacklist/whitelist to mute/unmute
- Follow @roschaefer suggestion in issue
- This can be reverted if we decide otherwise
2020-01-08 18:04:26 +01:00
mattwr18
c297b83f87 Convert block/unblock to blacklist/whitelist
- at the moment, we have implemented blocked like we want the
blacklist/whitelistUserContent to be, with the exception that is should
not be both ways. If I blacklist a user's content, they still see my
content in their news feed.
2020-01-07 18:57:35 +01:00
roschaefer
d7193ab3b6 Update neo4j-driver
Fix API changes. Also close the session in resolver only and refactor
userMiddleware to become a part of the resolver.
2019-12-17 20:20:16 +01:00
mattwr18
8a93e402b9 Remove neode update from production code
- Favor transaction functions we have more control over
2019-12-12 14:24:43 +01:00
mattwr18
d38131e24a Refactor to use transaction functions/logging 2019-12-11 19:27:37 +01:00
roschaefer
8f0ce19f09 Implement getDriver() and getNeode() the same way
I want to introduce `neode` and `neo4j-graphql-js` to my students and
saw this.
2019-12-05 21:00:24 +01:00
mattwr18
e6fdb70a07 Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1710-list-and-protocol-moderation 2019-11-27 18:09:24 +01:00
mattwr18
d03d669056 Remove reviewedByModerator from resources
- moved to Report node, as the report was reviewed by the moderator...
a resource can have many reports on them, so we are interested in
grouping reviewed/filed by report
2019-11-27 17:26:42 +01:00
mattwr18
2f249a73c5 Rename REPORTED Claim to FILED Report 2019-11-26 15:35:48 +01:00
Wolfgang Huß
a7aaee98c1 No new review if a reviewer changes their opinion 2019-11-22 10:39:55 +01:00
Wolfgang Huß
a5689e2f67 Get implementing 'reviewedByModerator' further 2019-11-22 08:44:40 +01:00
Wolfgang Huß
c0fb53c2b5 Get frontend running by start implementing 'reviewedByModerator' right 2019-11-21 13:35:12 +01:00
Wolfgang Huß
ef84e9991f Merge branch 'master' of github.com:Human-Connection/Human-Connection into 1710-list-and-protocol-moderation
# Conflicts:
#	backend/src/schema/index.js
2019-11-21 08:09:50 +01:00
Wolfgang Huß
cf02ca4506 Refactor decide mutation to new CaseFolder structure 2019-11-20 15:17:37 +01:00
roschaefer
b0d20ede71 Fix #2294
Ideally we would not have this inconsistent edge case that we filter
through the user type. Much better would be a graphql query like:

```graphql
{
  User(filter: { primary_email: { email: "something@example.org" } }) {
    id
    name
    slug
  }
}
```
2019-11-19 21:24:58 +01:00
Robert Schäfer
735a31ed00
Merge pull request #2101 from Human-Connection/1747-show-shouts
1747 show shouts
2019-11-18 17:00:43 +01:00
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
Alina Beck
6213a25355
Merge branch 'master' into 1747-show-shouts 2019-11-14 09:37:54 +03:00
mattwr18
b38fde0fd0 Fix production error "User.locale" returned undefined 2019-11-13 18:00:35 +01:00
mattwr18
feb65a6c9c Update property name to be more descriptive
- I wanted to trigger a build, since we had issues with our build server
today. I think this naming is more in the direction we want to go,
though. Maybe it could be makeShoutsPublic as @alina-beck used for the
translation keys... what do you think @kachulio
2019-11-12 21:19:52 +01:00
Alina Beck
6e3bd19267 set up privacy page in settings 2019-11-12 19:13:56 +03: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