Modify

Opened 7 years ago

Closed 10 months ago

Last modified 10 months ago

#7976 closed defect (fixed)

filter_exception_realms is ignored in DefaultPermissionFilter

Reported by: anonymous Owned by: Steffen Hoffmann
Priority: normal Component: AnnouncerPlugin
Severity: major Keywords: acct_mgr permission
Cc: Ryan J Ollos, Robert Corsaro Trac Release: 0.12

Description

This makes it impossible for the acct_mgr plugin to ever work.

Attachments (0)

Change History (11)

comment:1 Changed 7 years ago by anonymous

Change if permsys.check_permission(action, sid): to if event.realm in self.exception_realms or permsys.check_permission(action, sid):.

comment:2 Changed 7 years ago by Robert Corsaro

Priority: normalhighest

Thanks, I'll try and get to this soon.

comment:3 Changed 5 years ago by Steffen Hoffmann

Cc: Ryan J Ollos Robert Corsaro added; anonymous removed
Keywords: acct_mgr permission added
Owner: changed from Robert Corsaro to Steffen Hoffmann
Priority: highestnormal
Severity: criticalmajor

I understand, that this is related to a permission check.

But without more explanation I'm reluctant to apply this blindly right-away. I'd rather take a breath and resolve it in concert with related issues, notably #7759, #7974 and #7977.

comment:4 Changed 5 years ago by Steffen Hoffmann

(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 5 years ago by Steffen Hoffmann

(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:6 Changed 5 years ago by Steffen Hoffmann

(In [12331]) TracAnnouncer: Really fix filter now, refs #7759, #7976, #7977, #8740, #8927, #9090 and #9204.

Complete the change from [12325] to get expected behavior, or filters would be applied undesirably.

comment:7 Changed 5 years ago by Steffen Hoffmann

(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:8 Changed 5 years ago by Ryan J Ollos

(In [12353]) Refs #7759, #7976, #7977, #8740, #8927, #9090 and #9204: Fixed minor syntax error introduced in [12342].

comment:9 Changed 10 months ago by Ryan J Ollos

Owner: Steffen Hoffmann deleted

comment:10 Changed 10 months ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

comment:11 Changed 10 months ago by Ryan J Ollos

Owner: set to Steffen Hoffmann

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.