Wolfgang Huß
460f94ea3f
Add unauthenticated test to follow and shout
...
close #234
2019-03-13 14:32:15 +01:00
Robert Schäfer
5cff508bd6
Disable/enable fullfills tests
2019-03-06 01:07:04 +01:00
Robert Schäfer
0a73ddd46d
Refactor: custom resolvers for moderation
2019-03-05 23:59:54 +01:00
Robert Schäfer
2b7576521c
Fix lint
...
+ return more attributes in post factory for convenience
2019-03-05 18:17:02 +01:00
Robert Schäfer
99cebc8d64
Implementation ready except disabled attr.
2019-03-05 17:45:10 +01:00
Robert Schäfer
f2e7e515a4
Check from: User! matches the authenticated user
2019-03-05 16:46:39 +01:00
Robert Schäfer
85d9d7043e
Setup isModerator permission for disable relation
2019-03-05 16:25:01 +01:00
Robert Schäfer
180491c08c
Put isAuthor in permissions middleware
...
I find it dirty to access the database in a middleware, ie. I would like
to put all access on the database as close to the resolver as possible.
However, in this case that would mean to put the authorization check in
the resolver, where nobody expects it to be.
CC @appinteractive
2019-03-04 19:43:24 +01:00
Robert Schäfer
c869724d29
Let all tests pass 💚
2019-03-04 18:41:05 +01:00
Robert Schäfer
4a64755df7
Merge branch 'master' into 27_disable_posts
2019-03-03 15:27:27 +01:00
Robert Schäfer
8d1eb6026a
Let all tests pass 💚
2019-03-03 14:35:08 +01:00
Wolfgang Huß
6937c60ef8
Only admins are allowed to create badges
2019-03-01 15:49:11 +01:00
Matt Rider
5e592f666b
Write unit test badge creation
...
- for unauthenticated
- for authenticated admin
Co-authored-by: Wolfgang Huss <wolle.huss@pjannto.com>
2019-02-28 16:16:14 -03:00
Robert Schäfer
f3ab671f21
Soft delete middleware test passes
2019-02-28 18:37:52 +01:00
Robert Schäfer
69bf53e05e
Impplement currentUser query
...
* remove dead code (passport-jwt)
* refactor resolves to have a separate folder
* currentUser and login have the same response
2019-02-26 16:35:31 +01:00
Robert Schäfer
eda2ea34fc
Incorporate @appinteractive's feedback
...
@appinteractive can we merge this soon?
2019-02-21 20:03:22 +01:00
Robert Schäfer
ba26c0e188
Seed reported comments, posts and users
2019-02-20 11:36:50 +01:00
Robert Schäfer
7a70b9ece4
Implement authorization on Post mutations
2019-02-20 01:01:41 +01:00
Grzegorz Leoniec
8635cd162f
Merge branch 'master' into report-content
2019-01-14 17:16:19 +01:00
Grzegorz Leoniec
79749e6570
Fixed isOwner permission
2019-01-14 17:07:20 +01:00
Grzegorz Leoniec
5c88037d5c
WIP - first try to create a report mutation which attaches nodes internally
2019-01-03 15:27:26 +01:00
Robert Schäfer
43b5d8eeb0
Follow @appinteractives review
...
See:
https://github.com/Human-Connection/Nitro-Backend/pull/40#pullrequestreview-180898363
https://github.com/Human-Connection/Nitro-Backend/pull/40#pullrequestreview-180950115
2018-12-04 23:43:19 +01:00
Robert Schäfer
15d9178369
Install and configure eslint
...
Fix all violations but one - there is a mock in our authentication.
2018-12-03 18:05:28 +01:00
Grzegorz Leoniec
8c72c88e59
made permissions accessible for the outside
2018-11-21 15:38:47 +01:00
Grzegorz Leoniec
46c0289881
merge conflict fixed
2018-11-21 15:29:18 +01:00
Grzegorz Leoniec
c6420b5351
simplyfied schema and modulized seeding process
2018-11-21 15:16:55 +01:00
Robert Schäfer
859b2b8779
Reactivate isOwner as suggested in the comments
2018-11-20 21:43:13 +01:00
Robert Schäfer
803e613c4b
Clean way to seed the database
...
1. Temporarily open another backend with permissions disabled
2. Connect to this backend and run seed data
2018-11-20 21:43:13 +01:00
Grzegorz Leoniec
96da90a255
first attempt to automate dynamic seeding
2018-11-16 20:59:05 +01:00
Grzegorz Leoniec
59e9b9df1d
fixed date format
2018-11-15 12:44:41 +01:00
Grzegorz Leoniec
8b0be5fb89
try to fix seeder with authentication
2018-11-15 12:33:05 +01:00
Grzegorz Leoniec
e7c6bf1656
fixed permissions
2018-10-30 18:40:15 +01:00
Grzegorz Leoniec
dd89c52156
added permissions middleware and introduced walkRecursive helper
2018-10-30 13:03:05 +01:00