641 Commits

Author SHA1 Message Date
Alexandre Bodin
43b947b2ba v3.6.2 2021-05-11 11:43:35 +02:00
Jean-Sébastien Herbaux
934a47eb34
Add possibility to set "required" RBAC conditions (#10185)
* Add optional property 'required' to rbac conditions

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

* Fix tests, remove object handler support & fix bug (pm.queryFrom)

* Remove required property, handle required conditions at the engine level (raw)

* Update EE snapshots

* Add hasSuperAdminRole util
2021-05-10 11:24:45 +02:00
Alexandre Bodin
2fd29041f8 v3.6.1 2021-04-29 14:34:38 +02:00
Tom Dyson
5f08fa37e7
Fix typo in query error message (#10116)
The possessive `its` doesn't have an apostrophe.

https://www.dictionary.com/e/its-vs-its/
2021-04-26 17:08:09 +02:00
Alexandre Bodin
4ab210eec6 v3.6.0 2021-04-21 17:00:57 +02:00
Alexandre Bodin
614ce35d37 Merge branch 'master' into features/i18n 2021-04-09 17:43:59 +02:00
Alexandre BODIN
d67c749f34
Merge pull request #9994 from strapi/i18n/graphql
I18n/graphql
2021-04-09 15:40:55 +02:00
Alexandre Bodin
c7d67c53ed Add tests & handle _or & _where 2021-04-08 14:47:05 +02:00
Alexandre Bodin
c572b94349 Support extra _ root params 2021-04-08 14:13:39 +02:00
dependabot[bot]
ca237cffdf
Bump lodash from 4.17.20 to 4.17.21 (#9990)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.20...4.17.21)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-08 14:06:59 +02:00
Alexandre Bodin
118d81bec8 Merge branch 'master' into features/i18n 2021-04-07 13:39:28 +02:00
Mattias van den Belt
e65ad58d2c
Fix undefined filter value error (#8490) (#9603) 2021-04-07 13:37:42 +02:00
Alexandre BODIN
2b915bc44f
Update content-types.js 2021-04-06 16:54:59 +02:00
Alexandre Bodin
f2cddb4c15 UID is always localized in i18n 2021-04-06 11:23:43 +02:00
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