94 | | |
95 | | |
96 | | == Comments |
97 | | |
98 | | Thanks a ton! this works like a charm. |
99 | | |
100 | | Has this been filed as a ticket, so it can be possibly included in future releases? [mailto:bill.mill@gmail.com bill.mill@gmail.com] |
101 | | |
102 | | ---- |
103 | | Ticket [t:#3577] ask to include this in future releases.[[BR]] |
104 | | |
105 | | -- Florent |
106 | | |
107 | | ---- |
108 | | |
109 | | Here is the patch for 0.10 - by sgorilla |
110 | | |
111 | | {{{ |
112 | | yield ('metanav', 'logout', |
113 | | html.A('Logout', href=req.href.logout(), |
114 | | onclick="clearAuthenticationCache(\'%s\')" % req.href.logout())) |
115 | | }}} |
116 | | |
117 | | ---- |
118 | | |
119 | | And here's the patch for 0.11 - by gt4329b: |
120 | | |
121 | | {{{ |
122 | | yield ('metanav', 'logout', |
123 | | tag.a('Logout', href=req.href.logout(), |
124 | | onclick="clearAuthenticationCache(\'%s\')" % req.href.logout() )) |
125 | | |
126 | | }}} |
127 | | |
128 | | ---- |
129 | | |
130 | | You guys rock! I had created a 4 step script for people, but this actually does what logout is ''supposed'' to do :) For 0.8.4, rather than changing auth.py, you change the template file header.cs, by replacing this: |
131 | | |
132 | | {{{ |
133 | | <li><a href="<?cs var:trac.href.logout ?>">Logout</a> |
134 | | }}} |
135 | | |
136 | | with this |
137 | | |
138 | | {{{ |
139 | | <li><a href="<?cs var:trac.href.logout ?>" |
140 | | onclick="clearAuthenticationCache('<?cs var:trac.href.logout ?>')">Logout</a> |
141 | | }}} |
142 | | |
143 | | - by kriggs |
144 | | ---- |
145 | | |
146 | | Any way to have this work with AuthRequiredPlugin so that a logout doesn't immediately result in an auth dialog? (Yes, I realize this is the correct behavior with this patch and the plugin, just wanted to know if there's a simple workaround!) |
147 | | |
148 | | ''Not sure what you're asking here. This patch is designed to provide true http logout for those using the http auth mechanism. The AuthRequiredPlugin is designed to work with the AccountManagerPlugin which provides form based login and already provides true logout. To accomplish the same net effect as the AuthRequiredPlugin with http auth, you merely need to move the auth information to the root of the trac environment as opposed to /login. Thus, I would recommend adjusting web server configuration and dropping the AuthRequiredPlugin or use the forms based login from AccountManagerPlugin --BladeHawke'' |
149 | | |
150 | | -by Ross |
151 | | ---- |
152 | | |
153 | | problem with Opera 9.25 |
154 | | When I test the path with Opera the logout still does not work (remains on same page). |
155 | | |
156 | | ---- |
157 | | |
158 | | Using the following configuration: browsers under Mac OS X Leopard 10.5.2, server running FreeBSD 7.0, Apache 2.0 with SSL and Trac 10.1. |
159 | | |
160 | | 1) With Camino 1.6 works fine. |
161 | | |
162 | | 2) It doesn't work with Safari 3.1.1 |
163 | | |
164 | | -by Rik. |
165 | | |
166 | | ---- |
167 | | |
168 | | Confirmed that this patch does not work with Safari (3.1.2), but works fine with Camino. |
169 | | -lid (Jul 31 2008) |
170 | | |
171 | | ---- |
172 | | Much more simple workaround for firefox (?): |
173 | | {{{ |
174 | | tag.a('Logout', href=req.abs_href.logout().replace("://","://anonymous@"))) |
175 | | }}} |
176 | | |
177 | | Nothing more required. |
178 | | |
179 | | -till (April 14 2010) |