2 | | |
3 | | A simple patch that would make CommitTicketUpdater account for `[trac] ignore_auth_case` is: |
4 | | {{{#!diff |
5 | | diff --git a/tracopt/ticket/commit_updater.py b/tracopt/ticket/commit_updater.py |
6 | | index 1f16ce6..81f1139 100644 |
7 | | --- a/tracopt/ticket/commit_updater.py |
8 | | +++ b/tracopt/ticket/commit_updater.py |
9 | | @@ -209,7 +209,10 @@ In [changeset:"%s"]: |
10 | | |
11 | | def _update_tickets(self, tickets, changeset, comment, date): |
12 | | """Update the tickets with the given comment.""" |
13 | | - perm = PermissionCache(self.env, changeset.author) |
14 | | + author = changeset.author.lower() \ |
15 | | + if self.env.config.get('trac', 'ignore_auth_case') \ |
16 | | + else changeset.author |
17 | | + perm = PermissionCache(self.env, author) |
18 | | for tkt_id, cmds in tickets.iteritems(): |
19 | | try: |
20 | | self.log.debug("Updating ticket #%d", tkt_id) |
21 | | }}} |
22 | | |
23 | | The patch was quickly rewritten from memory so technically it's untested, but when I tested that (or a very similar) patch a few days ago it seemed to do the job. I'll do some additional testing. As a first step I was hoping to get feedback from the other devs as to whether this is the right approach to solving the issue. |