Modify

Opened 6 years ago

Closed 22 months ago

#3671 closed defect (worksforme)

Redirect not working when using a Ticket-URL

Reported by: anonymous Owned by: coderanger
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 5 years ago.
Workaround. Always redirects when not authed

Download all attachments as: .zip

Change History (8)

comment:1 Changed 6 years ago by coderanger

  • Resolution set to worksforme
  • Status changed from new to closed

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

comment:2 Changed 5 years ago by anonymous

  • Resolution worksforme deleted
  • Status changed from closed to reopened

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 5 years ago by coderanger

  • Resolution set to worksforme
  • Status changed from reopened to closed

Solution is still the same.

comment:4 Changed 5 years ago by anonymous

  • Resolution worksforme deleted
  • Status changed from closed to reopened

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 5 years ago by Geemark

  • Cc gammelmark@… added

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 5 years ago by Geemark

Workaround. Always redirects when not authed

comment:6 Changed 5 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 22 months ago by ejucovy

  • Resolution set to worksforme
  • Status changed from reopened to closed

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 Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from coderanger. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.