13 Commits

Author SHA1 Message Date
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
Mattias van den Belt
8aaf797a1c
Add email test in plugin settings (#8156)
* Add email test route and controller

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

* Add email settings page

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

* Add email Settings Container

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

* Remove unused getProviderConfig email service

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

* Add email (disabled) config fields

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

* Update email settings config form

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

* Update email settings container

Move Test button
Add testEmail input
Update config fields

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

* Update email settings form

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

* Update email plugin settings

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

* Update email plugin docs

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

* Update email settings page

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

* Update email settings permissions

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

* Update settings container form

* Update mail text
* Fix alignment
* Add yup validation
* Update form submission

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

* Fix e2e test

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

* Fix e2e test

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

* Fix Baseline

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

* Update email plugin docs

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

* Update (temp) BaselineAlignment component

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

* Update text and button styles and placement

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

* Update email routes and permissions

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

* Update email controller and service

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

* Update email admin permissions

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

* Update test permissions snapshot

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

* Update email admin permissions

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

* Update all test snapshot

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

* Update email settings permissions

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

* Update test snapshots

* Fix text width

* Update styling, baseline, and docs link

Co-authored-by: Alexandre BODIN <alexandrebodin@users.noreply.github.com>
2021-03-05 10:37:33 +01:00
Pierre Noël
d8f1449e73 change config format
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-05-15 15:05:35 +02:00
Pierre Noël
83f847f359 change config format
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-05-14 18:11:24 +02:00
Pierre Noël
471d9ef89c move email settings from db to files
Signed-off-by: Pierre Noël <petersg83@gmail.com>
2020-05-14 16:56:14 +02:00
Jim LAURIE
fd2aaecac1 Load scoped providers 2019-10-26 15:50:31 +02:00
Alexandre Bodin
3b47457f4f make boostrap functions async only 2019-08-12 15:35:40 +02:00
Alexandre Bodin
3a640539d3 Fix missing default providers 2019-05-06 16:01:18 +02:00
Alexandre Bodin
9e9ff9907d Refactor strapi load 2019-04-16 08:50:22 +02:00
Jim LAURIE
dac168cedb Manage email and upload providers from an npm organisation 2019-03-01 17:09:19 +01:00
Jim LAURIE
2afb30b2f9 Deprecated providers 2018-11-27 17:30:35 +01:00
Jim LAURIE
404afec5de Prefix providers 2018-10-19 09:26:09 +02:00
Austin Bratcher
ddc01eb27b Update to add dynamic settings to email plugin
Email plugin now functions more like the upload plugin. Users can go to the plugins page, click on the settings cog for the email, and switch between providers or change settings. The default provider is strapi-email-sendmail. Extra providers can be added by installing strapi-email-mailgun or strapi-email-sendgrid.
2018-05-31 14:29:00 -05:00