Perhaps the rest of you have an opinion on this. --Tom
---------- Forwarded message ---------- From: Douglas Cerna <[email protected]> Date: Tue, Oct 6, 2009 at 8:58 AM Subject: Validation questions To: Tom Hoffman <[email protected]> Tom: I'm adding validation to my email work and I have some questions: Since the email configuration is optional, all the fields added to the IApplicationPreferences interface (smtpHostname, smtpPort, stmpUsername, smtpPassword, smtpTLS) are set as "required=False" (look at the attached screenshot). This allows all those fields to be sent empty and get no validation error (for example, when you're only setting the school name). But, what happens if the user sets only the hostname (mail.example.com)? Should we then require a port, username and password? zope.sendmail makes all the values optional and assumes localhost for empty hostname, 25 for empty port, and None's for empty username, password and tls. Should I allow the user only to specify the port and not a hostname? Or the username without no password? And talking about passwords, the zope.schema.Password field has a weird functionality. Suppose you fill in all the five values. When you come back later to the form, the password is not displayed (security I guess). That could make the user think that there's no password at all. Also, should I add a password confirmation field? I'm starting to think that all these configurations should be move outside the Application Preferences area, maybe to the "schooltool.email" container, where you can delete and retry sending stuck emails. For the password, I'm starting to see it like the Person password, like a "Change Password" option. As usual, I'm feeling I'm not being clear :/ I'll try to stay connected today and maybe we can chat about it if you have time. Thanks, Douglas "... allí es cuando te das cuenta que las cosas malas pueden resultar bastante buenas..." - Lionel Messi Por favor, evite enviarme adjuntos de Word, Excel o PowerPoint. Vea http://www.gnu.org/philosophy/no-word-attachments.es.html
<<attachment: email_preferences.png>>
_______________________________________________ Mailing list: https://launchpad.net/~schooltool-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~schooltool-developers More help : https://help.launchpad.net/ListHelp

