Ticket #3671 (closed defect: worksforme)

Opened 5 years ago

Last modified 8 months ago

Redirect not working when using a Ticket-URL

Reported by: anonymous Assigned to: coderanger
Priority: high Component: PermRedirectPlugin
Severity: normal Keywords:
Cc: gammelmark@dat1.dk 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

permredirect-always-auth.diff (1.8 kB) - added by Geemark on 04/08/09 10:52:53.
Workaround. Always redirects when not authed

Change History

10/06/08 11:41:45 changed by coderanger

  • status changed from new to closed.
  • resolution set to worksforme.

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

03/04/09 17:07:37 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

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

03/04/09 18:17:58 changed by coderanger

  • status changed from reopened to closed.
  • resolution set to worksforme.

Solution is still the same.

03/30/09 17:27:42 changed by anonymous

  • status changed from closed to reopened.
  • resolution deleted.

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

04/08/09 10:20:51 changed by Geemark

  • cc set to gammelmark@dat1.dk.

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?

04/08/09 10:52:53 changed by Geemark

  • attachment permredirect-always-auth.diff added.

Workaround. Always redirects when not authed

04/08/09 10:55:50 changed 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.

09/30/12 01:25:31 changed by ejucovy

  • status changed from reopened to closed.
  • resolution set to worksforme.

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.


Add/Change #3671 (Redirect not working when using a Ticket-URL)




Change Properties
Action