-
-
Notifications
You must be signed in to change notification settings - Fork 196
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixes Unvalidated Email Succeeding to group addition #4104
base: master
Are you sure you want to change the base?
Conversation
@rohnsha0 thanks for creating this Pull Request and helping to improve Plone! TL;DR: Finish pushing changes, pass all other checks, then paste a comment:
To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically. Happy hacking! |
@jenkins-plone-org please run jobs |
Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py
Outdated
Show resolved
Hide resolved
Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please check my comments. The only thing that I consider a blocker is to not introduce new code for email validation.
I understand, it was my oversee... However pushed an commit with validation using |
@jenkins-plone-org please run jobs |
@rohnsha0 Did you push everything? I now get an AttributeError for |
Ah, I renamed |
Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py
Outdated
Show resolved
Hide resolved
Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py
Outdated
Show resolved
Hide resolved
Thanks for working on this. There is a problem when the new email validation fails: the form switches to a form for creating a new group. This is caused by the line Also, even with that fixed, any changes that the user has filled in, are gone when there is a validation error: the form shows the current group data. It should show the data from the request. One way to do this, would be to change the |
I've removed |
Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py
Outdated
Show resolved
Hide resolved
I've pushed a PR that retains the form data after an unsuccessful attempt. However, the name field is not getting retained! |
@jenkins-plone-org please run jobs |
Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py
Outdated
Show resolved
Hide resolved
Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py
Outdated
Show resolved
Hide resolved
Products/CMFPlone/controlpanel/browser/usergroups_groupdetails.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR prevents:
- setting multiple mail addresses separated by commas+space, see
COMMASPACE
in https://python.readthedocs.io/fr/hack-in-language/library/email-examples.html. - setting an email + display name/
This might be a breaking change for somebody.
I am not sure, I want that.
CC @plone/framework-team
Since when do we want to support multiple emails here? That would surprise me. |
I am just saying that it is actually possible with the current code base. |
the form now validates multiple mail id(s) as well along with displayName! @ale-rt @mauritsvanrees |
@jenkins-plone-org please run jobs |
I appreciate your efforts, but this seems like a breaking change without significant benefits. If another core developer agrees with your approach, I will anyway not veto it. I believe the PR has gone off track. Instead of raising a validation error, I would prefer issuing a warning to the user, indicating that the email field contains an invalid email-like value. Try to wait if somebody else has other opinions or if they are fine with your proposed approach! Thanks again for your patience and work! |
fixes #933