plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
500 stars 667 forks source link

build the registration from using the userschema provided by backend #6435

Open erral opened 1 month ago

erral commented 1 month ago

If your pull request closes an open issue, include the exact text below, immediately followed by the issue number. When your pull request gets merged, then that issue will close automatically.

Closes #6434

netlify[bot] commented 1 month ago

Deploy Preview for plone-components canceled.

Name Link
Latest commit 24d9f2e36d2d0cdc3794f9b62c1ae14ed05e2b82
Latest deploy log https://app.netlify.com/sites/plone-components/deploys/6748165cf6938d000839dd03
sneridagh commented 1 month ago

On the other hand, we can make it for 18.1 since it's a feature.

erral commented 1 month ago

LGTM. I am willing to make it enter in 18, but I need someone to test it and give feedback. Some Cypress tests would be great too. Any takers?

/cc @plone/volto-team

We can check this indeed.

erral commented 1 month ago

I have added a cypress test that shows that the fields in the /@userschema request are rendered in the form.

I have been checking also the implementation of the registration, and I see that we are using 2 settings userEmailAsLogin and showSelfRegistration which should be coming from backend (there are indeed 2 settings in backend for them).

But using them would mean to change the REST API to expose those settings (right now the /@registry endpoint is reserved for Managers), and then change the implementation not only of the registration form but also of other links and usages of those 2 settings.

Which means it is a larger project.