#2854 closed defect (fixed)
TICKET_CREATE without TICKET_VIEW redirect to denied page
| Reported by: | Owned by: | Noah Kantrowitz | |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.12 |
| Component: | ticket system | Version: | 0.9.4 |
| Severity: | normal | Keywords: | permission workflow |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
We have users who have TICKET_CREATE permission, but not TICKET_VIEW. These users get the 'permission denied' message when they are redirected to their newly created ticket after creating it. To avoid that I created a quick patch that redirects users without TICKET_VIEW permission back to the newticket module instead of the ticket.
Attachments (0)
Change History (7)
comment:1 by , 20 years ago
comment:2 by , 20 years ago
I think it makes more sense to allow users who have a TICKET_CREATE permission to see at least the ticket they've just created, no?
With your change, they'll certainly get the impression that their ticket was not created, and they'll probably try once or twice more before giving up…
comment:3 by , 20 years ago
You could also display a page which states that the ticket has been created and a link back to "New Ticket".
comment:4 by , 19 years ago
See also #3466 for restricting users from seeing tickets that are not their own.
comment:5 by , 19 years ago
| Component: | general → ticket system |
|---|---|
| Keywords: | permission workflow added |
| Milestone: | → 0.11 |
comment:6 by , 16 years ago
| Milestone: | next-minor-0.12.x → 0.12 |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
AFAICT, this was fixed on trunk in [7579].
comment:7 by , 16 years ago
| Owner: | changed from to |
|---|



The patch mentioned above:
Index: trac/ticket/web_ui.py =================================================================== --- trac/ticket/web_ui.py (revision 2983) +++ trac/ticket/web_ui.py (working copy) @@ -146,6 +146,10 @@ self.log.exception("Failure sending notification on creation of " "ticket #%s: %s" % (ticket.id, e)) + # offer NewTicket again if user is not allowed to view tickets + if not req.perm.has_permission('TICKET_VIEW'): + req.redirect(self.env.href.newticket()) + # Redirect the user to the newly created ticket req.redirect(self.env.href.ticket(ticket.id))