Modified: NavAddPlugin for Trac
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
navadd
README.textile
setup.py

README.textile

Modified NavAdd

This is a modified version of the NavAddPlugin for Trac:

http://trac-hacks.org/wiki/NavAddPlugin

I added support for a notperm config option to allow you to add or hide nav plugins based on a permission that the user doesn’t have.

Install

sudo python setup.py install

Add this to your trac.ini file

[components]
navadd.* = enabled

Example

This example will show a Login link in the user has the WIKI_VIEW permission but doesn’t have the TICKET_CREATE permission.

Then it will add a Logout link if the user has the TICKET_CREATE permission.

[navadd]
add_items = login, logout
login.title = Login
login.url = /sso/catch.php
login.perm = WIKI_VIEW
login.target = mainnav
login.notperm = TICKET_CREATE

logout.title = Logout
logout.url = /sso/catch.php
logout.perm = TICKET_CREATE
logout.target = mainnav