627 Commits

Author SHA1 Message Date
Alexandre Bodin
a66e0269da Merge branch 'master' into features/i18n 2021-03-25 15:07:41 +01:00
Jean-Sébastien Herbaux
1e5b1c99f6
I18n/ permissions rework (#9535)
* Add a domain layer for the permission, rework the engine handling of the permissions

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

* Add permissions-fields-to-properties migration for the admin

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

* Removes useless console.log

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

* Remove debug logLevel from provider-login.test.e2e.js

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

* Adds the new layout for the GET permissions, allow to subscribe to actionRegistered events, adds i18n handlers

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

* Fix typo

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

* Update permissions validators

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

* Update unit tests

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

* Update integrations test + fix some validation issues

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

* Change plugins & settings section format for the permissions layout

* only return locales property to localized subjects for the permission's layout

* Do not send the locales property to the permission's layout when there is no locales created

* Add the 'locales' property to publish & delete routes

* Fix unwanted mutation of the sections builder states on multiple builds

* Fix units tests with (new engine)

* Fix admin-role e2e test - Add locales property to the update payload

* fix e2e testsé

* Update e2e snapshots

* Fix unit test for i18n bootstrap

* Add mocks for i18n/bootstrap test

* Fix has-locale condition & updatePermission validator

* Avoid mutation in migration, always authorize super admin for has-locales condition

* Rework rbac domain objects, add a hook module and a provider factory

* Remove old providers

* Update the admin services & tests for the new rbac domain & providers

* Fix tests, bootstrap functions & services following rbac domain rework

* Update migration runner

* PR comments

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

* Remove useless console.log

* Fix sanitizeCondition bug

* Section builder rework

* Add test for the section-builder section & add jsdoc for the permission domain

* pr comments (without the migrations)

* fix fields-to-properties migration

* Add jsdoc for the sections-builder

* Moves createBoundAbstractDomain from permission domain to the engine service

* Remove debug logLevel for admin role test (e2e)

* Fix core-store

* Fix hooks & move business logic from i18n bootstrap to dedicated services

* add route get-non-localized-fields

* use write and read permission

* refacto

* add input validator

* add route doc

* handle ST

Co-authored-by: Pierre Noël <petersg83@gmail.com>
Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
2021-03-25 14:59:44 +01:00
Alexandre Bodin
3065d72a4b v3.5.4 2021-03-25 14:34:45 +01:00
Alexandre Bodin
17b2296d11 Init core api extension for i18n 2021-03-16 15:35:30 +01:00
Alexandre Bodin
2467cad937 Merge branch 'i18n/localizations-sync' into features/i18n 2021-03-16 10:01:25 +01:00
Alexandre Bodin
90deea4d67 Change field name 2021-03-12 17:52:28 +01:00
Alexandre Bodin
4583e3d086 Split logic cleanly between visible & writable attributes 2021-03-12 14:34:04 +01:00
Alexandre Bodin
c57b3be1eb Merge branch 'master' into features/i18n 2021-03-12 09:45:51 +01:00
Alexandre Bodin
33552e43b8 v3.5.3 2021-03-11 14:25:37 +01:00
Alexandre Bodin
2ea169cbee Do not count localizations in CM 2021-03-11 10:27:48 +01:00
dependabot[bot]
fcc409de7c
Bump date-fns from 2.16.1 to 2.19.0 (#9666)
Bumps [date-fns](https://github.com/date-fns/date-fns) from 2.16.1 to 2.19.0.
- [Release notes](https://github.com/date-fns/date-fns/releases)
- [Changelog](https://github.com/date-fns/date-fns/blob/master/CHANGELOG.md)
- [Commits](https://github.com/date-fns/date-fns/compare/v2.16.1...v2.19.0)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
2021-03-10 12:01:06 +01:00
Alexandre Bodin
298a954888 Use non writables instead of static creator fields in fields logic 2021-03-09 20:50:23 +01:00
DMehaffy
ba0637e26b
Update all documentation links in the code-base and readmes (#9643)
Signed-off-by: Derrick Mehaffy <derrickmehaffy@gmail.com>
2021-03-09 09:13:15 +01:00
Alexandre Bodin
996341f5d5 Move to many way & add populate option on assoc 2021-03-05 15:44:23 +01:00
Alexandre Bodin
e9b4bf5616 Merge branch 'master' into features/i18n 2021-03-05 12:22:18 +01:00
Alexandre Bodin
1a472c98a7 v3.5.2 2021-03-01 11:24:44 +01:00
Convly
3cc49c4ea8 v3.5.1 2021-02-23 11:23:21 +01:00
Alexandre Bodin
469991f9f2 Merge branch 'master' into features/i18n 2021-02-18 14:36:32 +01:00
Alexandre Bodin
d02a7ba2fa v3.5.0 2021-02-18 11:28:28 +01:00
Alexandre BODIN
adf05599a5
Fix sanitize polumorphic entites that can be undefiend or ids only (#9441) 2021-02-18 11:20:32 +01:00
Alexandre Bodin
6f4655a266 Add tests & refactor into services 2021-02-15 11:24:28 +01:00
Alexandre Bodin
68f3e2bee2 Init i18n fields 2021-02-11 16:48:01 +01:00
Pierre Noël
b3a9b5ad76 add pluginOptions 2021-02-10 14:29:54 +01:00
Alexandre Bodin
544f98b8ee v3.4.6 2021-02-03 19:32:36 +01:00
Alexandre BODIN
8d342d33b7
Fix sanitize removing polymorphic relations (#9310) 2021-02-03 19:28:11 +01:00
Mattias van den Belt
23ead26f94
Fix undefined filter value (#8490)
* Fix undefined filter value

Fixes #8201

Signed-off-by: MattieBelt <mattiasvandenbelt@gmail.com>

* Move isNil() before .map() & update error message

Fixes #8201

Signed-off-by: MattieBelt <mattiasvandenbelt@gmail.com>

* Fix allowing to find null values

Signed-off-by: MattieBelt <mattiasvandenbelt@gmail.com>

Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
2021-02-01 16:18:17 +01:00
Pierre Noël
291aeb07bc add read/create/update route for locales 2021-01-29 10:12:34 +01:00
Jorrit Schippers
175422d760
Update .npmignore files (#8865)
Add .editorconfig, .snyk, __tests__, jest.config.js
Remove .npmignore and .gitignore from admin subdirectories

Signed-off-by: Jorrit Schippers <jorrit@ncode.nl>
2021-01-28 16:57:29 +01:00
Jorrit Schippers
3f63902d4b
Use https:// in package.json and README.md files (#9227)
Signed-off-by: Jorrit Schippers <jorrit@ncode.nl>
2021-01-26 17:06:25 +01:00
Alexandre Bodin
4f9cc8a22c v3.4.5 2021-01-26 11:59:47 +01:00
Alexandre Bodin
542786f263 v3.4.4 2021-01-20 17:31:59 +01:00
Alexandre Bodin
553d64cafd v3.4.3 2021-01-14 10:46:50 +01:00
Alexandre Bodin
7505de6ad9 v3.4.2 2021-01-13 12:16:44 +01:00
Jorrit Schippers
8d88f5e97f
Consolidate lodash dependency to 4.17.20 (#8861)
Signed-off-by: Jorrit Schippers <jorrit@ncode.nl>

Co-authored-by: Pierre Noël <petersg83@users.noreply.github.com>
2021-01-13 12:08:13 +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
Christian Sandven
e825232dd5
check that model and model.privateAttributes is not undefined (#8669)
Signed-off-by: csandven <christian@recheckit.com>

Co-authored-by: csandven <christian@recheckit.com>
Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
2021-01-11 16:53:13 +01:00
soupette
8b9c3f2052 v3.4.1 2020-12-22 16:52:46 +01:00
Pierre Noël
355888a5e7 add unit test for getRelationalFields 2020-12-18 17:53:52 +01:00
Pierre Noël
23dcde6d90 add didConfigureListView 2020-12-18 16:19:39 +01:00
DMehaffy
aad1c2fa03
Cleaning up codebase for doc repo move (#8892)
* [WIP] Cleaning up codebase for doc repo move

WIP

* Fix deleted files, add links to doc repo issues

* Add repo note to readme
2020-12-18 15:50:37 +01:00
Alexandre Bodin
ea636b4d31 v3.4.0 2020-12-17 13:18:50 +01:00
Pierre Noël
885dc5a138 refacto findWithRelationCounts 2020-12-16 17:44:43 +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
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
Alexandre Bodin
9b28991d8a v3.3.4 2020-11-25 16:22:45 +01:00
soupette
61a3740c06 Fix conflicts
Signed-off-by: soupette <cyril.lpz@gmail.com>
2020-11-23 14:43:07 +01:00
Alexandre Bodin
5fe7fa2f79 v3.3.3 2020-11-16 16:47:16 +01:00
Alexandre Bodin
17ea510715 v3.3.2 2020-11-10 19:02:11 +01:00