Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed login/logout/logged as items in metanav #168

Merged
merged 1 commit into from
Jan 27, 2024

Conversation

bmispelon
Copy link
Member

@bmispelon bmispelon commented Jan 27, 2024

Most of the issues were caused by Trac's clever plugin system where classes implementing INavigationContributor all contribute to the metanav. Plugins can then override existing links by making sure they pass the same name (second element in the yielded tuple in get_navigation_items()). On top of that, trac.ini can override any item by specifying a .label configuration.

Rather than trying to figure this all out, I've opted to hardcode the navigation menu in the HTML. This has the nice side-effect of removing the dependency on the forked trac-github.

This commit therefore includes a revert of d8760ad.

Fixes #51

Most of the issues were caused by Trac's clever plugin
system where classes implementing INavigationContributor
all contribute to the metanav. Plugins can then override
existing links by making sure they pass the same name
(second element in the yielded tuple in get_navigation_items()).
On top of that, trac.ini can override any item by specifying
a <item name>.label configuration.

Rather than trying to figure this all out, I've opted to
hardcode the navigation menu in the HTML. This has the nice
side-effect of removing the dependency on the forked trac-github.

This commit therefore includes a revert of
d8760ad.

Fixes django#51
@felixxm
Copy link
Member

felixxm commented Jan 27, 2024

@bmispelon Fantastic 🚀 Thanks 👍

@felixxm felixxm merged commit 125e6f9 into django:main Jan 27, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trac doesn't show "logged in as xxx" anymore
2 participants