Pierre Noël
b3a9b5ad76
add pluginOptions
2021-02-10 14:29:54 +01:00
Jozef Cipa
808b2a464f
Handle duplicate entry error ( #8367 )
...
* Handle duplicate entry error message in bookshelf connector
Signed-off-by: jozefcipa <jozef.cipa@strv.com>
* Handle duplicate error message in mongoose connector
Signed-off-by: jozefcipa <jozef.cipa@strv.com>
* Apply changes from review
* Fix wrapping transactions in bookshelf adapter
* Add missing await to wrapErrors
* Call findOne without this
2021-01-25 14:03:48 +01:00
Quentin Dauprat
de33136264
feat(users-permissions): Add Auth0 provider ( #8362 )
...
* feat(users-permissions): Add Auth0 provider
Signed-off-by: Heziode <heziode@protonmail.com>
* fix(users-permissions): update path to providers settings
Update path due to change in U&P path in v3.1.5
Signed-off-by: Heziode <heziode@protonmail.com>
2021-01-25 09:09:45 +01:00
Pierre Noël
70ffd7c65b
Fix CM limited to show only 100 entries ( #9118 )
...
* fix mongo count
* harmonize code between mongoose and bookshelf
* refacto
2021-01-13 20:15:45 +01:00
Kim, Harim
ac3d10006c
Add session option to Strapi query for Mongo Multi-Document transaction ( #6447 )
...
* add session option to mongo queries for transaction
Signed-off-by: harimkims <harimkims@gmail.com>
* seperate session parameter in buildQuery functions
Signed-off-by: harimkims <harimkims@gmail.com>
* clarify comment about mongoose create requirement
Signed-off-by: harimkims <harimkims@gmail.com>
Co-authored-by: Convly <jean-sebastien.herbaux@epitech.eu>
2021-01-13 10:37:23 +01:00
Jean-Sébastien Herbaux
1d3576c729
Fix count method w/ D&P filters on MongoDB ( #9094 )
...
* Fix the count method not working with publication state on mongodb by passing all the filters to the query instead of only the where clauses
* Add test for the count api method w/ publication state filter
* Remove sort limit and start from the filters for the count method
* Handle publicationState params in countSearch too
2021-01-11 17:01:27 +01:00
Convly
c3a2c7024d
PR review adjustments
2021-01-08 10:09:10 +01:00
Convly
ecbe3bd1b0
Fix tests
...
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2021-01-08 10:09:08 +01:00
Convly
823070df9d
Fix mongoose destroy function & re-add strapi.stop calls
...
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2021-01-08 10:09:07 +01:00
Jean-Sébastien Herbaux
a77928d8ed
Fix deep query sort when using pagination operators (start, limit) ( #9046 )
2021-01-06 14:25:26 +01:00
Alexandre Bodin
2a6e1e0b84
Add tests to data-loaders
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2021-01-04 15:55:07 +01:00
Pierre Noël
f8f7a4a89f
fix mongo preview when array is missing ( #8887 )
2020-12-14 12:01:27 +01:00
Pierre Noël
7c347ee5c2
fix mongo many-way preview
2020-12-11 17:28:57 +01:00
Alexandre BODIN
d6f5b0c572
Merge pull request #8829 from strapi/relational-fields/sort-by-relation
...
Relational fields/ Sort by relation
2020-12-10 14:05:56 +01:00
Alexandre Bodin
e630cee0c9
Small refactoring to make the code easier to read
2020-12-10 11:17:41 +01:00
Convly
a415638848
mongoose:buildQuery : add the sort operator after the query matches, handle id=>_id, optimize the reorder by ids
2020-12-10 10:02:29 +01:00
Pierre Noël
4b25c36739
Add count
2020-12-08 17:27:02 +01:00
Convly
0096024de6
Fix deep filtering / sort on mongodb
...
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-12-08 16:56:21 +01:00
Convly
92451db825
Add deep sort to mongoose, fix sort order on both connectors, cleanup
...
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-12-08 16:56:21 +01:00
Alexandre Bodin
c9c936ba41
Merge branch 'master' into feature/relational-fields
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-11-25 16:37:32 +01:00
DMehaffy
bac867c816
Add support for columnType in Mongoose ( #8723 )
...
Signed-off-by: Derrick Mehaffy <derrickmehaffy@gmail.com>
2020-11-25 13:54:44 +01:00
soupette
61a3740c06
Fix conflicts
...
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-11-23 14:43:07 +01:00
Deepak
9508a31c4c
fix : #8342 ignore dynamic zone component if its not in data ( #8366 )
...
Signed-off-by: Deepak Thukral <iapain@gmail.com>
2020-11-10 09:43:12 +01:00
Alexandre Bodin
07e7cfc0bd
Make lint stricter and fix the errors
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-11-02 19:41:42 +01:00
Alexandre BODIN
81c684d7b4
Merge pull request #8314 from strapi/fix/dpMigration
...
fix d&p regressions
2020-10-20 14:08:49 +02:00
Convly
07c38420d4
Fix buildQuery for polymorphic relations
...
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-10-19 15:42:32 +02:00
Convly
e1e2dd3419
Remove unnecessary custom option from query
...
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-10-19 15:39:56 +02:00
Convly
03f5342123
Fix deepFiltering with draft & publish
...
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-10-19 15:39:56 +02:00
Pierre Noël
025eed964c
dont run d&p migration at CT creation + rebuild tables if there were deleted in DB
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-10-16 18:54:09 +02:00
Jean-Sébastien Herbaux
b2b4515d9b
Fix D&P population ( #8249 )
...
* Fix D&P population (gql, rest)
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Fix units tests
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Fix mongoose filtering on non draft & publish model
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
Co-authored-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-08 20:54:48 +02:00
Alexandre Bodin
0df69c30ce
Allow setting the published_at field in the API
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-05 14:07:17 +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
dependabot[bot]
048e6fd3af
Bump mongoose from 5.8.0 to 5.10.7 ( #8046 )
...
* Bump mongoose from 5.8.0 to 5.10.7
Bumps [mongoose](https://github.com/Automattic/mongoose ) from 5.8.0 to 5.10.7.
- [Release notes](https://github.com/Automattic/mongoose/releases )
- [Changelog](https://github.com/Automattic/mongoose/blob/master/History.md )
- [Commits](https://github.com/Automattic/mongoose/compare/5.8.0...5.10.7 )
Signed-off-by: dependabot[bot] <support@github.com>
* Do not use empty username or password in mongo connection
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-02 09:27:46 +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
Igor Nikolenko
4700f79bcf
Fix validation of Date and Time field types for Mongoose connector ( #7801 )
...
Signed-off-by: richardgrey <richie.grey@gmail.com>
2020-09-29 14:53:56 +02:00
Pierre Noël
7221412d68
Draft publish/validators ( #7853 )
...
* add validators for dz, components and relations
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-09-22 17:45:59 +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
74a85c1127
Add migration d&p
2020-09-22 17:39:40 +02:00
Pierre Noël
38216554d5
Draft publish/remove some validators for drafts ( #7537 )
...
* remove required + minLength validator for drafts
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-09-22 17:39:24 +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
Alexandre Bodin
1cc74ca6a0
Fix virtual mongoose remove _v char
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-08-10 15:19:28 +02:00
Pierre Noël
6d825fc3ca
fix count with sort param
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-24 15:06:38 +02:00
Alexandre Bodin
38d67fc873
Fix mongo issues
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 16:07:11 +02:00
Convly
20f80b2361
Better permissions-manager.sanitize behavior
...
Forbid empty arrays as fields for permissions (on ability creation)
Differentiate input from output sanitizing
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 11:48:38 +02:00
Alexandre Bodin
4edad86029
Add basic created_by updated_by
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:16 +02:00
Alexandre Bodin
966d9c554f
Move hasDeepFilters to utils
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:36:26 +02:00
Alexandre Bodin
6776a3ce46
Add mongo support
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:36:24 +02:00
Pierre Noël
970a470034
add tests + make role decription optional + refacto
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-08 10:59:34 +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