Opened 5 years ago

Last modified 4 years ago

#8926 new enhancement

[PATCH] configurable group_whitelist, systematic negation operation, mixed-case group names

Reported by: bof Owned by: rjollos
Priority: normal Component: VirtualTicketPermissionsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


This ticket provides an enhancement patch covering the following bullet points:

  • in addition to the group_blacklist, in section [virtualticketpermissions], you can also write a group_whitelist setting.
    • only groups on the whitelist will be considered for the TICKET_IS_..._GROUP permissions
    • the blacklist, if also configured, still works
    • both whitelist and blacklist entries can be regular expressions (each list will be regex-compiled once on component init for performance)
  • group names can be mixed-case in addition to the already supported all-lower-case; only complete-upper-case stuff, i.e. PERMISSIONS_PROPER, are excluded
  • for all of the TICKET_IS_XXX permissions provided by the module, there is now a corresponding TICKET_IS_NOT_XXX negating the test. This permits writing mutually exclusive workflow steps, like this:
    reassign = assigned,accepted,started -> assigned
    reassign.operations = set_owner
    reassign.permissions = TICKET_IS_OWNER_GROUP
    takeover = assigned,accepted,started -> assigned
    takeover.operations = set_owner_to_self
    takeover.permissions = TICKET_IS_NOT_OWNER_GROUP
    A single user will either see reassign (when they share a group with the current owner), or takeover, but never both (unless they are TRAC_ADMIN, which seems to not call down to the plugin at all, unfortunately)

Attachments (3)

virtualticketpermissions-negation-and-whitelist.patch (5.4 KB) - added by bof 5 years ago. (5.6 KB) - added by rjollos 5 years ago.
Added TICKET_IS_NOTOWNER permission (fixes t:#5475) (5.6 KB) - added by rjollos 5 years ago.
Added TICKET_IS_NOTOWNER permission (fixes t:#5908)

Download all attachments as: .zip

Change History (9)

comment:1 Changed 5 years ago by rjollos

I'm moving the attachments from the wiki page over to this ticket.

Changed 5 years ago by rjollos

Added TICKET_IS_NOTOWNER permission (fixes t:#5475)

Changed 5 years ago by rjollos

Added TICKET_IS_NOTOWNER permission (fixes t:#5908)

comment:2 Changed 5 years ago by rjollos

  • Owner changed from normanr to rjollos

This patch in whole or part will be committed soon. Here is the comment from the project wiki page that I removed when the attachments were removed:


Modified (original : modified) to add new permission TICKET_IS_NOTOWNER. Can be used to fix Trac Ticket #5908 (action "accept" in a ticket visited by owner), for example:

accept.permissions = TICKET_IS_NOTOWNER

comment:3 Changed 4 years ago by normanr

btw, I'm pretty sure that negation-and-whitelist.patch obsoletes the policy patches, the policy patches could probably just be dropped.

comment:4 Changed 4 years ago by bungybun

  • Cc rjollos added; anonymous removed

Any news on the patch. The attachment seems to be empty.

comment:5 follow-up: Changed 4 years ago by bof

The attachment isn't empty when you download it. Don't know what of it confuses the previewer here...

If there are functional questions, I'd try to find some time to address them - earliest next week, as I'm busy right now with other work.

comment:6 in reply to: ↑ 5 Changed 4 years ago by bungybun

  • Cc anonymous added; rjollos removed

My apologies I didn't even think to try and download. As you say the previewer doesn't like it.

I don't imagine there'll be functional questions; I just didn't want to have to re-invent the wheel, but thanks anyway.

Add Comment

Modify Ticket

as new The owner will remain rjollos.

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

Note: See TracTickets for help on using tickets.