19 Commits

Author SHA1 Message Date
Alexandre Bodin
85e40efe22 Add i18n telemetry 2021-04-21 15:32:30 +02:00
Pierre Noël
25e8e3793e rename isLocalized to isLocalizedContentType 2021-04-07 15:10:43 +02:00
Convly
e1f1c14c13 Sync super admin permissions with locales list for localized subjects 2021-03-26 09:46:06 +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
266e740c1c Auto add locale query param & add wrapOptions logic in entity service 2021-03-09 11:43:11 +01:00
Alexandre Bodin
9e547da9ff Implement entity service decorators & update lifecycles methods 2021-03-09 11:05:26 +01:00
Alexandre Bodin
996341f5d5 Move to many way & add populate option on assoc 2021-03-05 15:44:23 +01:00
Pierre Noël
a9941265f6 create default locale and allow empty name for a locale 2021-03-03 09:52:26 +01:00
Alexandre Bodin
e7189d2578 Fix typos & remove unecessary parameter 2021-02-17 17:21:32 +01:00
Alexandre Bodin
9020fc4e91 Add lifecycles to manage locale & localizations fields 2021-02-17 13:00:49 +01:00
Alexandre Bodin
cefdde18f4 Init db lifecycles manager 2021-02-16 16:48:16 +01:00
Alexandre Bodin
fad50fe569 Add basic default locale set & make attribute non writable 2021-02-16 14:36:11 +01:00
Alexandre Bodin
eb935a8b71 Cleanup lifecycle in strapi app 2021-02-15 11:40:30 +01:00
Alexandre Bodin
be1b8f20e8 Cleanup to be mergeable now 2021-02-15 11:32:37 +01:00
Alexandre Bodin
6f4655a266 Add tests & refactor into services 2021-02-15 11:24:28 +01:00
Alexandre Bodin
443ace7c62 Add route & handler + lifecycles 2021-02-12 12:23:51 +01:00
Alexandre Bodin
68f3e2bee2 Init i18n fields 2021-02-11 16:48:01 +01:00
Alexandre Bodin
ff6127a21f Add locale crud permissions 2021-01-25 20:58:33 +01:00
Pierre Noël
3729f69e08 init i18n plugin 2021-01-22 17:57:15 +01:00