Edgewall Software
Modify

Opened 18 years ago

Closed 14 years ago

Last modified 14 years ago

#2854 closed defect (fixed)

TICKET_CREATE without TICKET_VIEW redirect to denied page

Reported by: gh@… 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 gh@…, 18 years ago

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))
 

comment:2 by Christian Boos, 18 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 Markus Tacker <m@…>, 18 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 sid, 18 years ago

See also #3466 for restricting users from seeing tickets that are not their own.

comment:5 by Christian Boos, 17 years ago

Component: generalticket system
Keywords: permission workflow added
Milestone: 0.11

comment:6 by Remy Blank, 14 years ago

Milestone: next-minor-0.12.x0.12
Resolution: fixed
Status: newclosed

AFAICT, this was fixed on trunk in [7579].

comment:7 by Remy Blank, 14 years ago

Owner: changed from Jonas Borgström to Noah Kantrowitz

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Noah Kantrowitz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Noah Kantrowitz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.