Modify

Opened 16 years ago

Closed 11 years ago

#3671 closed defect (worksforme)

Redirect not working when using a Ticket-URL

Reported by: anonymous Owned by: Noah Kantrowitz
Priority: high Component: PermRedirectPlugin
Severity: normal Keywords:
Cc: gammelmark@… Trac Release: 0.11

Description

When directly calling a Ticket-URL where the Ticket-View-Permission is only given after login, the Redirect is not done and the error is printed on the screen. For example: http://tracserver/project/ticket/3

Attachments (1)

permredirect-always-auth.diff (1.8 KB) - added by Geemark 15 years ago.
Workaround. Always redirects when not authed

Download all attachments as: .zip

Change History (8)

comment:1 Changed 15 years ago by Noah Kantrowitz

Resolution: worksforme
Status: newclosed

Most likely an installation issue. Please ask for assistance installing plugins in the IRC channel.

comment:2 Changed 15 years ago by anonymous

Resolution: worksforme
Status: closedreopened

Same behaviour here with 0.11 The PermRedirectPlugin works in any area except on a direct ticket-link like http://tracserver/project/ticket/3

comment:3 Changed 15 years ago by Noah Kantrowitz

Resolution: worksforme
Status: reopenedclosed

Solution is still the same.

comment:4 Changed 15 years ago by anonymous

Resolution: worksforme
Status: closedreopened

No, it is not an installation issue. The redirect is working fine in every other area, except for ticket-links. For ticket-links Trac says that "TICKET_VIEW privileges are required" (Anonymous users have no right to view Tickets).

comment:5 Changed 15 years ago by Geemark

Cc: gammelmark@… added; anonymous removed

I can confirm the same behaviour on Trac 0.11.2.

I tried to modify your code by always doing a redirect as the first line of the "post_process_request" method. It seems the code is not even triggered, when the url is /ticket/X. Reports, wiki pages etc. works just fine.

Granted that I am an absolute beginner to Python, I see nowhere that you specify which URLs you are interested in filtering, so maybe this is in fact a general Trac issue, and not an issue with the plugin.

Do you know this to be working in a specific 0.11 release? If so, which one?

Changed 15 years ago by Geemark

Workaround. Always redirects when not authed

comment:6 Changed 15 years ago by Geemark

I just added a patch that works for my purposes. However, it ALWAYS redirects if the user is not logged in, no matter if there is a permission error or not. In my concrete scenario that does not matter, since anonymous users are not allowed at all.

Although it does not solve the general problem, maybe someone else can benefit from it.

comment:7 Changed 11 years ago by ejucovy

Resolution: worksforme
Status: reopenedclosed

I can't reproduce this using the trunk of the plugin and Trac 1.0; if anyone is still seeing this issue, please leave a comment and I'll follow up to try to figure out how to reproduce the bug. Closing as "worksforme" in the meantime.

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'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.