#7977 closed defect (fixed)
AccountManager plugin does not work
Reported by: | anonymous | Owned by: | Steffen Hoffmann |
---|---|---|---|
Priority: | normal | Component: | AnnouncerPlugin |
Severity: | major | Keywords: | acct_mgr subscriber |
Cc: | Ryan J Ollos, Robert Corsaro | Trac Release: | 0.12 |
Description
This diff against r9174, along with resolving the issues in #7974 and #7976, gets us an AccountManager plugin that will at least respond to password resets.
-
announce.py
old new 79 79 self._notify('verify', username, token=token) 80 80 81 81 # IAnnouncementSubscriber interface 82 def subscriptions(self, event):83 if event.realm == 'acct_mgr':84 for subscriber in self._get_membership(event):85 self.log.debug("AccountManagerAnnouncement added '%s " \86 "(%s)'", subscriber[1], subscriber[2])87 yield subscriber88 89 82 def matches(self, event): 90 yield 83 if event.realm != 'acct_mgr': 84 return 85 86 for subscriber in self._get_membership(event): 87 self.log.debug("AccountManagerAnnouncement added '%s " \ 88 "(%s)'", subscriber[2], subscriber[3]) 89 yield subscriber 91 90 92 91 def description(self): 93 return 'notify me an account changes NOT IMPLEMENTED' 92 return 93 94 def requires_authentication(self): 95 return True 94 96 95 97 # IAnnouncementFormatter interface 96 98 def styles(self, transport, realm): … … 155 157 for result in settings[event.category].get_subscriptions(): 156 158 yield result 157 159 elif event.category in ('verify', 'reset'): 158 yield ( 'email', event.username, True, None)160 yield (self.__class__.__name__, 'email', event.username, True, None, 'text/plain', 1, 'always') 159 161 160 162 def _format_plaintext(self, event): 161 163 acct_templates = {
Attachments (0)
Change History (13)
comment:1 Changed 14 years ago by
comment:2 follow-up: 3 Changed 14 years ago by
Thanks. The accountmanager plugin definitely needs some love. I was hoping to get it started and have it taken over by someone else. I'll definitely show it some love in the coming months.
comment:3 Changed 12 years ago by
Cc: | Ryan J Ollos Robert Corsaro added; anonymous removed |
---|---|
Keywords: | acct_mgr subscriber added |
Owner: | changed from Robert Corsaro to Steffen Hoffmann |
Severity: | normal → major |
Replying to doki_pen:
Thanks. The accountmanager plugin definitely needs some love. I was hoping to get it started and have it taken over by someone else. I'll definitely show it some love in the coming months.
Hm, seems like in reality it went quite the other way-round, right?
As a matter of fact after much work on AccountManagerPlugin I'm here to bring this plugin on level. Thanks for the report and substantial hints on how to fix this issue. After re-working parts of the database code it should be easy to resolve this issue. Thanks for your patience until then.
comment:4 Changed 12 years ago by
(In [12309]) TracAnnouncer: Implement unused filter_exception_realms
option, refs #7976 and #7977.
The chosen implementation should be slightly more efficient than what has been proposed in #7976, but I agree, that this is a pre-reqisite for making some subscribers effective, i.e. AccountManagerPlugin notifications.
comment:5 Changed 12 years ago by
comment:6 Changed 12 years ago by
(In [12325]) TracAnnouncer: Fix generator, that was broken by [12309], refs #7759, #7976, #7977, #8740, #8927, #9090 and #9204.
And the same bad filter code even got replicated in [12312]. Sorry for not
checking compiler errors earlier. Finally I discovered an UnboundLocalError
for resource_id
hidden behind the first error. Obviously unit tests are
a blessing and needed here too.
comment:7 Changed 12 years ago by
comment:8 Changed 12 years ago by
(In [12342]) TracAnnouncer: Add 'acct_mgr' as default for 'filter_exception_realms' option, refs #7759, #7976, #7977, #8740, #8927, #9090 and #9204.
IMHO this is required for better plugin usability, making AccountManagerPlugin notifications pass without additional configuration effort now.
Some Python doc-string tweaks and another unit test slipped in here too.
comment:9 Changed 12 years ago by
comment:10 Changed 12 years ago by
(In [12503]) AnnouncerPlugin: Extend AccountManager notifications as required, refs #843, #7759 and #7977.
Note, that any previous version of TracAnnouncer won't work with latest AccountManagerPlugin 'trunk' code, and this already made me thinking about a more robust change listener definition. But this is another subject.
comment:11 Changed 8 years ago by
Owner: | Steffen Hoffmann deleted |
---|
comment:12 Changed 8 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:13 Changed 8 years ago by
Owner: | set to Steffen Hoffmann |
---|
Oh, I forgot to mention in the description that this also requires
filter_exception_realms = acct_mgr
in the[announcer]
section of trac.ini or the announcements will just get filtered out if default filtering is enabled.