52 Commits

Author SHA1 Message Date
Alexandre Bodin
fd18d2a67a Merge branch 'master' into features/i18n 2021-04-02 17:33:24 +02:00
Pierre Noël
740f22762e
fix error wording when join table name is too long (#9880) 2021-03-30 12:34:50 +02:00
Alexandre Bodin
2467cad937 Merge branch 'i18n/localizations-sync' into features/i18n 2021-03-16 10:01:25 +01:00
Alexandre Bodin
c40c3ba8c3 pick assoc populate fields option 2021-03-12 17:56:38 +01:00
Alexandre Bodin
4583e3d086 Split logic cleanly between visible & writable attributes 2021-03-12 14:34:04 +01:00
germangonzo
a40e3b0014
Fix error with polymorphic relations when the attribute name is different to related (#9396) 2021-03-11 14:11:23 +01:00
Pierre Noël
08f9b05d21
Fix query when filtering and sorting on a relational field (#9045)
* fix query when filtering and sorting on a relational field

* add tests + refacto

* remove useless code
2021-01-11 17:21:01 +01:00
Alexandre BODIN
6558161227
Fix ML (#8604)
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-11-09 19:21:08 +01:00
Pierre Noël
60bf24ce8b
Fix query when populating morph relations (#8548)
* change query when populating morph relations

Signed-off-by: Pierre Noël <petersg83@gmail.com>

* refacto

Signed-off-by: Pierre Noël <petersg83@gmail.com>

* refacto

Signed-off-by: Pierre Noël <petersg83@gmail.com>

* refacto

Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-11-06 14:35:36 +01:00
Pierre Noël
e2341e9b06 run creation/update of the database even if the model hasnt changed
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-10-16 18:54:10 +02:00
Alexandre BODIN
b91059a522
Fix undefined pk (#8260)
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-10-09 17:08:37 +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
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
Pierre Noël
a138695d95
fix missing hasTimestamp (#8010)
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-09-23 17:49:28 +02:00
Pierre Noël
74a85c1127 Add migration d&p 2020-09-22 17:39:40 +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
8b6bf7fd10 Fix core_store init first
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-27 20:26:56 +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
85ea0abdc8 Add condition
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 11:48:16 +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
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
Convly
8a69d187d0 Update models attributes & get models from the database manager
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:21:24 +02:00
Convly
1f3506710d Handle special scenarios where pluginName === 'admin' when retrieving models
Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-07-08 10:21:16 +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
ebee707ec4 Add basic proto of lifecycles
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-05-04 10:55:06 +02:00
Alexandre Bodin
45f1a1ffbe Remove idAttribute and idAttributeType options because breaks strapi
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-04-28 15:44:05 +02:00
Alexandre Bodin
087920fb47 Merge branch 'develop' into features/media-lib
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-31 11:58:31 +02:00
Pierre Noël
ab79327577 move function checkDuplicatedTableNames in its own file
Signed-off-by: Pierre Noël <pierre.noel@strapi.io>
2020-03-30 14:39:31 +02:00
Pierre Noël
f2663eb1f7 improve joinTable customization + test collectionName duplicates
Signed-off-by: Pierre Noël <pierre.noel@strapi.io>
2020-03-27 15:51:23 +01:00
soupette
818927f7b5 Fix conflicts
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-03-23 14:33:17 +01:00
Pierre Noël
ff1fbcdfba small refacto
Signed-off-by: Pierre Noël <pierre.noel@strapi.io>
2020-03-20 16:44:25 +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
df14b08618 Add file ordering
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-03-20 11:04:22 +01:00
Pierre Noël
65a3e83ee3 Change error message when bookshelf db connection fails at start
Signed-off-by: Pierre Noël <pierre.noel@strapi.io>
2020-03-13 12:20:06 +01:00
Alexandre Bodin
de9521ce6b Merge branch 'develop' into features/single-types
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-02-10 21:09:50 +01:00
Alexandre Bodin
e8f5d46d06 Create realted_col for self referencing many ways
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-01-23 23:34:28 +01:00
Alexandre Bodin
4f039b2df8 Clean lint
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-01-17 10:43:17 +01:00
Alexandre Bodin
b5cceb8760 Cleanup graphql and use model uids 2019-12-10 17:24:55 +01:00
Alexandre Bodin
f55e1f704b Do not parse date types 2019-12-05 12:29:24 +01:00
Alexandre Bodin
dd072c40c3 Refactor column creation to use plain knex schema builder 2019-12-05 11:37:07 +01:00
Alexandre Bodin
95c7a515d7 Split parser and formatter in specific files 2019-12-04 17:49:13 +01:00
Alexandre Bodin
2dbad3fcde Init date type splitting 2019-12-04 17:49:12 +01:00
Alexandre Bodin
399b84451d Edit relations logic with key kept in place 2019-11-21 20:34:05 +01:00
Alexandre Bodin
a5288f0cf7 Implement new populate algorithm loading nested components and dynamic zones 2019-11-13 18:49:05 +01:00
Alexandre Bodin
80fb99f38e Refactor populateFetch in its own module 2019-11-13 18:49:04 +01:00
Alexandre Bodin
6339a92016 Delete dynamic zone components bookshelf 2019-11-13 18:49:03 +01:00
Alexandre Bodin
79d1207c0c Create dynamiczone in queries 2019-11-13 18:49:02 +01:00
Alexandre Bodin
b9122edf0d Rename groups to components 2019-11-13 18:49:02 +01:00
Alexandre Bodin
ae3f421737 Add requireFetch false to all bookshelf models 2019-10-25 10:12:35 +02:00