#11457 closed defect (fixed)
Prevent tickets from being accepted by anonymous
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | TracHacks |
Severity: | normal | Keywords: | workflow |
Cc: | osmions, Olemis Lang, Steffen Hoffmann, Jun Omae, Michael Renzmann | Trac Release: |
Description
A frequent issue is that users will accept a ticket without being logged-in, and the ticket will then be assigned to anonymous. This was recently noted in comment:4:ticket:9984. I'll try modifying the workflow to avoid this.
Attachments (0)
Change History (9)
comment:2 follow-up: 8 Changed 11 years ago by
In reply to comment:5:ticket:9984, in order to change the behavior in Trac and have the workflow set_owner_to_self
use the value from the author
field of the form, we'd need a patch to Trac such as the one shown in trac:#11418.
That would actually complicate things even more on trac-hacks if the aim is to avoid having tickets assigned to anonymous through the accept action. There is no way I can see to tell the workflow to only allow the accept action if a value other than anonymous is found in the author
form field. A plugin would likely be needed to enforce the behavior.
For now, I'll just add the TICKET_ACCEPT
permission, and maybe work that patch in the Trac core later on if no one else wants to pursue this first.
comment:3 follow-up: 7 Changed 11 years ago by
The current workflow is the Trac 0.10 workflow with the addition of a set_resolution
action (comment:7:ticket:11133) for TICKET_ADMIN
s:
accept = new -> assigned accept.operations = set_owner_to_self accept.permissions = TICKET_MODIFY leave = * -> * leave.default = 1 leave.operations = leave_status reassign = new,assigned,reopened -> new reassign.operations = set_owner reassign.permissions = TICKET_MODIFY reopen = closed -> reopened reopen.operations = del_resolution reopen.permissions = TICKET_CREATE resolve = new,assigned,reopened -> closed resolve.operations = set_resolution resolve.permissions = TICKET_MODIFY set_resolution = closed -> closed set_resolution.name = set resolution set_resolution.operations = set_resolution set_resolution.permission = TICKET_ADMIN
Proposed change is to adopt the Trac 0.11 workflow, along with:
set_resolution
andset_owner
actions forTICKET_ADMIN
s.- adding a
TICKET_ACCEPT
permission, requiring it for accepting a ticket and granting it toauthenticated
. - Removing the
accepted
->accepted
transition, which seems to be just noise in the workflow.
accept = new,assigned,reopened -> accepted accept.operations = set_owner_to_self accept.permissions = TICKET_ACCEPT leave = * -> * leave.default = 1 leave.operations = leave_status reassign = new,assigned,accepted,reopened -> assigned reassign.operations = set_owner reassign.permissions = TICKET_MODIFY reopen = closed -> reopened reopen.operations = del_resolution reopen.permissions = TICKET_CREATE resolve = new,assigned,accepted,reopened -> closed resolve.operations = set_resolution resolve.permissions = TICKET_MODIFY set_resolution = closed -> closed set_resolution.name = set resolution set_resolution.operations = set_resolution set_resolution.permission = TICKET_ADMIN set_owner = closed -> closed set_owner.name = set owner set_owner.operations = set_owner set_owner.permission = TICKET_ADMIN
comment:4 Changed 11 years ago by
Status: | new → accepted |
---|
comment:5 follow-up: 6 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Please let me know if you spot any issues with the new workflow.
comment:6 Changed 11 years ago by
Replying to rjollos:
Please let me know if you spot any issues with the new workflow.
afaict this should work ok, thnx for taking the time to dive into this
comment:7 Changed 8 years ago by
Replying to Ryan J Ollos:
- Removing the
accepted
->accepted
transition, which seems to be just noise in the workflow.
This has been restored. It's useful when you wish to accept a ticket that is in the accepted state but assigned to another user.
comment:8 Changed 8 years ago by
Replying to Ryan J Ollos:
For now, I'll just add the
TICKET_ACCEPT
permission, and maybe work that patch in the Trac core later on if no one else wants to pursue this first.
Made some additional changes today:
- Anonymous now has
TICKET_CHGPROP
in addition toTICKET_APPEND
- Authenticated has
TICKET_MODIFY
, soTICKET_ACCEPT
appears to be unnecessary and has been removed.tracopt.perm.config_perm_provider.extrapermissionsprovider
has been disabled. The workflow has been changed:-accept.permissions = TICKET_ACCEPT +accept.permissions = TICKET_MODIFY
Two options that I can see:
TICKET_MODIFY
from anonymous, grantTICKET_CHGPROP
andTICKET_APPEND
to anonymous and grantTICKET_MODIFY
to authenticated. This would also prevent anonymous users from resolving tickets: TracPermissions#TicketSystem.TICKET_ACCEPT
permission, grant it to authenticated and modify the workflow (TracPermissions#CreatingNewPrivileges):Any opinions or suggestions?