On Wed, Jan 25, 2017 at 07:56:36PM +0100, Peter Suter wrote:
> On 18.01.2017 09:43, Sandro Santilli wrote:
> >
> >The RecipientMatcher class is not documented so it is not clear
> >what the expected input is.
>
> The input is some string found in a ticket field. It could be an email
> address, a username or just a plain name, or even something (anything) else.
> RecipientMatcher is trying to find matching known usernames or valid email
> addresses that could be used as recipients.

In our case we need the EmailResolver to tell what can or cannot be used
as a recipient, but RecipientMatcher does not use EmailResolver.
The *caller* does, and only does IF RecipientMatcher does not return None,
which currently does unless the "sid" matches an authenticated user.

> The reason that RecipientMatcher does exactly that is mainly backward
> compatibility. Those are the things that have been supported historically,
> so they should continue to work.

Do you think EmailResolver returning a name even if it's not authenticated
could break something ? The returned tuple does have an "authenticated"
field, so could be used by caller not willing to deal with non-authenticated
strings ...

   https://git.osgeo.org/gogs/strk/trac/commit/a72b9176f

> >>As a last (and not very satisfying) resort, you could also replace all the
> >>INotificationSubscribers with your own implementations that work like you
> >>want I guess. :/
> >This would be no different than applying the patch above, right ?
> It would only be different in that you don't have to patch the source.

Got it, but sounds overkill at this stage.

--strk;

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to trac-users+unsubscr...@googlegroups.com.
To post to this group, send email to trac-users@googlegroups.com.
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to