#3808 closed enhancement (fixed)
redirecting to a custom page after logout
Reported by: | anonymous | Owned by: | Christian Boos |
---|---|---|---|
Priority: | low | Milestone: | 0.11 |
Component: | general | Version: | 0.10.3 |
Severity: | normal | Keywords: | custom logout navigation |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description (last modified by )
i would like to redirect my users to a custom page after logout as of now when a user logs out the page on which the user clicks the logout link is reloaded
Attachments (0)
Change History (16)
comment:1 by , 18 years ago
Keywords: | custom logout added |
---|---|
Owner: | changed from | to
Priority: | normal → low |
Version: | 0.9.6 → 0.10.3 |
follow-up: 3 comment:2 by , 18 years ago
Keywords: | navigation added |
---|---|
Milestone: | → 0.11 |
Summary: | redirecting to a cutom page after logout → redirecting to a custom page after logout |
This could be part of the changes for making the navigation more easily customizable.
comment:3 by , 18 years ago
Replying to cboos:
This could be part of the changes for making the navigation more easily customizable.
I do not remember the ticket reference, but it has been decided not to allow customization of wiki page names for "special" pages (WikiStart, RecentChanges, …).
I think that this decision should be applied for this enhancement as well: Trac could redirect to a predefined page name, but this page name could be "hardcoded".
follow-ups: 5 6 comment:4 by , 18 years ago
Description: | modified (diff) |
---|---|
Milestone: | 0.11 |
Resolution: | → duplicate |
Status: | new → closed |
You're referring to #4422 I believe. The difference here is that the logout link is in the general Trac navigation (metanav in this case), so we can't assume that the Wiki component will always be available. We therefore can't redirect to "LogOut" or something. But it should be possible to do this with a simple configuration setting, if wanted.
The idea of being able to configure the default location of the navigation entries is a follow-up of the "Discussing two changesets" trac-dev thread. So I'd like to come up with a consistent solution, and I even found a pre-existing ticket for that, see #2060.
comment:5 by , 18 years ago
comment:6 by , 18 years ago
Milestone: | → 0.11 |
---|---|
Resolution: | duplicate |
Status: | closed → reopened |
comment:7 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Feature implemented in r5253.
comment:8 by , 17 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:10 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-up: 12 comment:11 by , 17 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I tested this feature with Environment url is on subdirectory, like http://hostname/projects/[PROJECTENV]/
.
When I configured:
[metanav] logout.redirect = wiki/Logout
redirect to http://hostname/wiki/Logout
, instead of http://hostname/project/env/wiki/Logout
.
Test variations:
config | redirect to |
wiki/Logout | /wiki/Logout
|
/wiki/Logout | /project/env/wiki/Logout
|
http://hostname/ | http://hostname/
|
site/logout.html | /site/logout.html
|
/site/logout.html | /project/env/site/logout.html But displays No handler matched request to /site/logout.html
|
/chrome/site/logout.html | /project/env/chrome/site/logout.html
|
Maybe:
- if custom_redirect.startswith('/'): + if not custom_redirect.startswith('/'):
follow-up: 13 comment:12 by , 17 years ago
Replying to trac-ja@i-act.co.jp:
I tested this feature with Environment url is on subdirectory, like
http://hostname/projects/[PROJECTENV]/
.
What is the value of the base_url
parameter in your trac.ini
file?
comment:13 by , 17 years ago
Replying to eblot:
Replying to trac-ja@i-act.co.jp:
I tested this feature with Environment url is on subdirectory, like
http://hostname/projects/[PROJECTENV]/
.What is the value of the
base_url
parameter in yourtrac.ini
file?
Sorry, base_url
was not set.
Now, I set base_url
to /projects/[PROJECTENV]
.
Variations:
config | redirect to |
wiki/Logout | /projects/env/wiki/Logout
|
http://hostname/ | http://hostname/
|
chrome/site/logout.html | /projects/env/chrome/site/logout.html
|
/projects | /projects/env/projects
|
On last example, I expect to redirect to /projects
.
I thought the config entry starts with /
means url's root directory like [header_log] src
and TracLinks.
Have I misunderstood this feature?
comment:14 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
No, it seems you are right. Fixed in [6173].
comment:15 by , 17 years ago
Ah, wait, I only tested for 'wiki/Logout' and '/otherenv/wiki/Logout'. I need to handle the absolute URL case as well.
comment:16 by , 17 years ago
Ok, with [6174], this should now work for all your listed variations. Please confirm.
Extra points to be earned by updating TracNavigation ;-)
to redirict to a special url after logout and to prevent ugly logout errormessages change web/auth.py
or hope that someone will add a better configfile driven solution