Modify

Opened 4 years ago

Last modified 2 years ago

#7976 new defect

filter_exception_realms is ignored in DefaultPermissionFilter

Reported by: anonymous Owned by: hasienda
Priority: normal Component: AnnouncerPlugin
Severity: major Keywords: acct_mgr permission
Cc: rjollos, doki_pen Trac Release: 0.12

Description

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

Attachments (0)

Change History (8)

comment:1 Changed 4 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 4 years ago by doki_pen

  • Priority changed from normal to highest

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

comment:3 Changed 2 years ago by hasienda

  • Cc rjollos doki_pen added; anonymous removed
  • Keywords acct_mgr permission added
  • Owner changed from doki_pen to hasienda
  • Priority changed from highest to normal
  • Severity changed from critical to major

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 2 years ago by hasienda

(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 2 years ago by hasienda

(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 2 years ago by hasienda

(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 2 years ago by hasienda

(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 2 years ago by rjollos

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

Add Comment

Modify Ticket

Action
as new The owner will remain hasienda.
Author


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

 
Note: See TracTickets for help on using tickets.