Hi,<br>
<br>
I'm integrating trac with a couple of other things (incl. Zope), using the Apache module mod_auth_tkt for single sign-on.<br>
My login/logout pages also take care of the trac cookies, and all of this actually works great!<br>
<br>
However, the "metanav navigation" in trac is not hardcoded anymore (I'm
using 0.9.4 now), and I couldn't find an easy way to override the
existing login/logout URLs.<br>
My current workaround is to change the "chrome.nav.metanav" items
inside the header template, just before the menu bar is generated by
nav():<br>
<br>
<?cs # Mangle navigation items for customized authentication ?><br>
<?cs if:trac.authname == "anonymous" || !trac.authname ?><br>
<?cs set:chrome.nav.metanav.login = 'logged in as ' + trac.authname ?><br>
<?cs set:chrome.nav.metanav.logout = '<a href="/logout">Logout</a>' ?><br>
<?cs else ?><br>
<?cs set:chrome.nav.metanav.login = 'not logged in' ?><br>
<?cs set:chrome.nav.metanav.logout = '<a href="/login">Login</a>' ?><br>
<?cs /if ?><br>
<br>
That's not only ugly, it poses two other problems:<br>
1. The actual trac variables trac.href.login/logout - from which
metanav seems to be built - remain the same: if they are used somewhere
else they will have the wrong value<br>
2. I had to swap login and logout to make it prettier - adding to the
confusion - because Clearsilver only knows "set", not "unset"/"del".
Rebuilding the whole list seemed insane.<br>
<br>
Is there a way - let's say in trac.ini - to redefine trac.href.login/logout?<br>
Do I really have to write a plugin that replaces (though inherits 99% of) the existing login module?<br>
<br>
All I want to do is change the URLs - the actual auth is sorted!<br>
<br>
Cheers,<br clear="all">Danny<br>