Edgewall Software

Opened 12 years ago

Last modified 9 years ago

#10833 closed defect

ConfigurableTicketWorkflow's "Reassign To" ignores fine-grained permissions with restrict_owner=True — at Initial Version

Reported by: Ethan Jucovy <ethan.jucovy@…> Owned by:
Priority: normal Milestone: 1.1.3
Component: ticket system Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

When [ticket] restrict_owner = True, the default ticket workflow implementation renders a dropdown box for actions that perform a set_owner operation.

If the set of possible owners is not specified in the workflow configuration, it is populated with a call to PermissionSystem(env).get_users_with_permission('TICKET_MODIFY'), just like the similar dropdowns that are rendered by TicketSystem.eventually_restrict_owner on the new ticket form and query builder.

However, after fetching the list of all known users with TICKET_MODIFY, the workflow does not check whether those users have the TICKET_MODIFY permission for the current ticket. If the system is configured to use a fine-grained permission policy like browser:trunk/sample-plugins/permissions/vulnerability_tickets.py, where the global TICKET_MODIFY permission does not guarantee TICKET_MODIFY for any given ticket, this could result in strange states where the ticket's owner does not have permission to close, modify or reassign the ticket.

I'm not sure whether this actually is a bug that should be fixed. For one thing, as long as the users who have permission to reassign a ticket are trusted to know what they're doing, it's not really a problem. It's also not necessarily Trac's job to ensure that the owner field is restricted to "sensible" choices, and anyway there are plenty of other ways that the system could end up in a similar state with certain combinations of configuration.

Change History (1)

by Ethan Jucovy <ethan.jucovy@…>, 12 years ago

introduce a new config option to respect fine-grained permissions in configurable-ticket-workflow's restrict_owner behavior

Note: See TracTickets for help on using tickets.