25 Commits

Author SHA1 Message Date
Alexandre Bodin
c60f826f4e Fix unit test
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-05 14:24:41 +02:00
Alexandre Bodin
c98089ff65 Merge branch 'master' into releases/3.2
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-05 12:00:03 +02:00
Jean-Sébastien Herbaux
e55ea1d6b5
Hide creator fields from public api by default (#8052)
* Add model option to hide/show creators fields in public API response

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Add content-types util, rework sanitize-entity's private handling

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Update search e2e tests, fix an issue on empty search for the core-api controller (find)

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Fix GraphQL plugin (handle privates attributes on typeDefs + resolver builds)

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Fix sanitizeEntity import

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Move doc update from beta to stable

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Fix e2e test

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Fix pr comments

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Remove creator's field from upload controller routes

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Fix typedef build for graphql association

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Fix pr (comments + several issues)

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Add tests for search behavior in content-manager

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Rename files variables to meaningful names (upload controllers)

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Fix test with search id matching serialNumber

Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>

* Add toHasBeenCalledWith check for config.get (utils/content-types.test.js)

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

Co-authored-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-01 17:47:08 +02:00
Alexandre Bodin
8589848ce4 Merge branch 'features/draft-publish' into releases/3.2
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-01 16:23:32 +02:00
Diego Albitres
0670c896e3
Add privateAttributes to global and per model response (#7331)
* Added privateAttributes globally and per model

Signed-off-by: Diego Albitres <diego.albitres@gmail.com>

* Added tests for sanitizeEntity

Signed-off-by: Diego Albitres <diego.albitres@gmail.com>

* Fixed broken test

Signed-off-by: Diego Albitres <diego.albitres@gmail.com>

* Added privateAttributes to GraphQL responses

Signed-off-by: Diego Albitres <diego.albitres@gmail.com>

* Added docs for privateAttributes

Signed-off-by: Diego Albitres <diego.albitres@gmail.com>

* Refactored and fixed PR comments

Signed-off-by: Diego Albitres <diego.albitres@gmail.com>

* Merged tests and fixed broken tests from merge

Signed-off-by: Diego Albitres <diego.albitres@gmail.com>

* Updated documentation for new option

Signed-off-by: Diego Albitres <diego.albitres@gmail.com>

* Refactored GraphQL implementation

Signed-off-by: Diego Albitres <diego.albitres@gmail.com>

* Fixed PR comments

Signed-off-by: Diego Albitres <diego.albitres@gmail.com>

* Fixed tests for sanitize-entity

Signed-off-by: Diego Albitres <diego.albitres@gmail.com>

* Removed code and tests for ignorePrivateFor

Signed-off-by: Diego Albitres <diego.albitres@gmail.com>

* Exported getPrivateAttributes for GraphQL plugin

Signed-off-by: Diego Albitres <diego.albitres@gmail.com>

* Removed ignorePrivateFor from docs

Signed-off-by: Diego Albitres <diego.albitres@gmail.com>
2020-09-24 09:40:10 +02:00
Jean-Sébastien Herbaux
c4716d5668 [D&P] Return published content by default from get apis (#7657)
* Add _publicationState request param / Returns live by default for CT that have D&P activated

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-09-22 17:39:46 +02:00
Pierre Noël
e29c1b7de9 add published_at (#7374)
* add published_at

Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-09-22 17:39:18 +02:00
Jean-Sébastien Herbaux
1e67421668
Add utils::sanitize-entity tests (#7497)
* Add utils::sanitize-entity tests

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-08-18 16:26:24 +02:00
Alexandre Bodin
29fcf7c3cd Clean find relation list and tests
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:42 +02:00
Pierre Noël
1ee5b7f189 fifth refacto
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 11:10:09 +02:00
Convly
651d42dbea fix PR comments, move pagination logic to the database layer, handle searches
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:50:44 +02:00
Convly
60b24dd3c3 Add GET /admin/users route and new pagination system
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:49:22 +02:00
Alexandre Bodin
919aae2211 Fix unit tests
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 10:21:28 +02:00
Thiago Augusto
a96d41eeca
Preventing parse-type Date test failure due to Time Zone differences (#6044)
Signed-off-by: Thiago Augusto <thiago.android88@gmail.com>
2020-05-05 19:34:32 +02:00
Pierre Noël
e0e561e6d0 add test for escapeQuery()
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-04-30 19:47:04 +02:00
Alexandre Bodin
c8de166051 Add deleteRelations logic in connectors
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-20 11:04:23 +01:00
Alexandre Bodin
7a8c865051 Merge branch 'develop' into features/media-lib
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-02 15:18:08 +01:00
Alexandre Bodin
f6cf06d22c Add notNull validator for edition
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-02-18 09:02:48 +01:00
Alexandre Bodin
eec7d04b20 Fix policy tests after prefix renaming
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-02-11 10:06:17 +01:00
Alexandre Bodin
0b59bd61f6 Refactor policy util and error handling
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-02-10 21:37:16 +01:00
Alexandre Bodin
74d25bb459 Add validators 2019-12-24 14:49:44 +01:00
Alexandre Bodin
909266232f Add tests on datetime 2019-12-04 18:49:47 +01:00
Javier Castro
83d0bc0978 feat: add _null operator 2019-07-05 10:45:14 -03:00
Alexandre Bodin
31a222ecb1 Start lint fixes 2019-05-29 17:25:56 +02:00
Alexandre Bodin
a6ffb9237e Cleanup unused code 2019-03-22 19:25:29 +01:00