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
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
Convly
1182b848dd
Fix weird behavior on strapi-admin e2e tests for mongo
...
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:38:18 +02:00
Alexandre Bodin
8ce56f3517
Fix typos
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 10:25:11 +02:00
atlmtw
66637e0101
Update mount-models.js ( #6916 )
...
This is to ensure custom mongoose queries that exclude dynamic zone fields don't fail.
Referring to this issue:
https://github.com/strapi/strapi/issues/6016
2020-07-06 09:35:55 +02:00
Pierre Noël
10092f5a57
refacto
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-07-01 11:59:33 +02:00
Pierre Noël
25bfb7204f
fix search for numbers for mongoDB < 4.2.0
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-06-30 16:51:31 +02:00
Pierre Noël
950a21469f
add filtering to search route
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-06-30 15:50:52 +02:00
Alexandre BODIN
3401348146
Fix mongo error trying to cast from empty array ( #6358 )
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-05-26 14:29:43 +02:00
Alexandre Bodin
1edc581864
Remove lifecycles from connectors
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-05-04 10:55:08 +02:00
Alexandre Bodin
3b40bcee59
Merge branch 'master' into develop
2020-05-04 10:49:30 +02:00
Pierre Noël
7c837cde6c
refacto
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-04-30 19:47:03 +02:00
Pierre Noël
115600f1aa
search for mongodbId if the query is a mongodbId
...
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-04-30 19:47:03 +02:00
Pierre Noël
015480b1b5
Change search logic
...
Signed-off-by: Pierre Noël <pierre.noel@strapi.io>
2020-04-30 19:47:02 +02:00
Alexandre Bodin
431715138a
Init restricted-names API
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-04-30 13:55:15 +02:00
Marvin König
4e70d6665c
Fix relation detection for components ( #5713 )
...
This fixes the deleteOldComponents function in the
strapi-connector-mongoose package. This needs to be done, as the id can
be either a string or a Buffer at this point.
Signed-off-by: Marvin König <dev@mkqavi.com>
2020-04-17 16:51:25 +02:00
Alexandre Bodin
4f3c4ab340
Merge branch 'develop' into features/media-lib
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-04-15 10:23:46 +02:00
Convly
b88092966c
Remove auto-sync indexes for mongodb from production envs
...
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-04-09 15:29:07 +02:00
Alexandre Bodin
50df7365d6
Merge branch 'develop' into features/media-lib
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-30 12:04:04 +02:00
Jean-Sébastien Herbaux
4a8de29100
Fix ability to update unique constraints in mongoose ( #5612 )
...
* Sync indexes on model mount with mongoose
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
* Use Mongoose.Model.syncIndexes callback arg to subscribe to Model's indexes messages. Get rid off errors-pron-promises.
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-03-27 11:39:53 +01:00
soupette
38b7823b34
Merge branch 'develop' of github.com:strapi/strapi into features/media-lib
2020-03-26 08:01:22 +01:00
Diogo Correia
400893fd6a
Prevent error when content type doesn't have searchable fields
...
Signed-off-by: Diogo Correia <me@diogotc.com>
2020-03-23 14:36:58 +00:00
Diogo Correia
684c65ab2e
Add 'UID' field search to Mongoose
...
Signed-off-by: Diogo Correia <me@diogotc.com>
2020-03-23 14:36:58 +00:00
Alexandre Bodin
be24f640d9
some cleanup
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-20 11:06:47 +01:00
Alexandre Bodin
c7f10bfede
Update populate to keep array order
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-20 11:04:24 +01:00
Alexandre Bodin
01fe498407
Delete fk for oneToOne and oneToMany mongo
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-20 11:04:24 +01: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
0c395eef7e
Support order bookshelf
...
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-20 11:04:23 +01:00
soupette
f99f83af02
Merge branch 'develop' of github.com:strapi/strapi into features/media-lib
2020-03-13 11:04:45 +01:00
Pierre Noël
a1774db410
return null instead of promise
...
Signed-off-by: Pierre Noël <pierre.noel@strapi.io>
2020-03-09 17:22:36 +01:00
Pierre Noël
b5f9795dbc
small refacto of findOne + fix deleteMany of connector-mongoose
...
Signed-off-by: Pierre Noël <pierre.noel@strapi.io>
Signed-off-by: Pierre Noël <pierre.noel@strapi.io>
2020-03-09 12:09:43 +01:00