#7629: Make it possible to restrict the domains of email addresses
----------------------------+-----------------------------------------------
Reporter: jason | Owner: was
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-4.3.3
Component: notebook | Keywords:
Author: Mitesh Patel | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
----------------------------+-----------------------------------------------
Changes (by ddrake):
* status: needs_review => needs_work
Comment:
This needs a bit of work.
First, is it possible to doctest this? Ultimately, the function is just
doing a regex match, so we should be able to doctest it...but I don't
exactly know how.
Second, I think {{{re.search}}} would be better than {{{re.match}}};
search finds the regex anywhere in the string, but match by default only
looks at the beginning of the string
(http://docs.python.org/library/re.html). We can use {{{re.search}}} and
anyone who needs the regex to match at the beginning of the string can use
{{{^}}}. I thought the patch was broken until I looked this up in the
Python documentation, so others will definitely run into this.
Finally, it would be nice to distinguish between invalid email addresses
and disallowed addresses. Invalid is something like "[email protected]";
disallowed is something that the server admin doesn't allow. I say this
because I'm anticipating emails from people outside of campus saying "the
server says my email isn't valid, but it is, really!" and then I'd have to
explain. Ideally, I'd like something like "The server administrator has
restricted the email addresses that can be used here, and yours is not
allowed."
With doctests and {{{re.search}}}, I'll give this a positive review.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/7629#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.