Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 41 lines (27 sloc) 0.931 kB
88f75d5 @davglass Intial Import
davglass authored
1 h3. Modified NavAdd
2
3 This is a modified version of the NavAddPlugin for Trac:
4
5 <a href="http://trac-hacks.org/wiki/NavAddPlugin">http://trac-hacks.org/wiki/NavAddPlugin</a>
6
7 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.
8
9
10 h3. Install
11
12 @sudo python setup.py install@
13
14 Add this to your @trac.ini@ file
15
16 <pre>
17 [components]
18 navadd.* = enabled
19 </pre>
20
21 h3. Example
22
23 This example will show a Login link in the user has the @WIKI_VIEW@ permission but doesn't have the @TICKET_CREATE@ permission.
24
25 Then it will add a Logout link if the user has the @TICKET_CREATE@ permission.
26
27 <pre>
28 [navadd]
29 add_items = login, logout
30 login.title = Login
31 login.url = /sso/catch.php
32 login.perm = WIKI_VIEW
33 login.target = mainnav
34 login.notperm = TICKET_CREATE
35
36 logout.title = Logout
37 logout.url = /sso/catch.php
38 logout.perm = TICKET_CREATE
39 logout.target = mainnav
40 </pre>
Something went wrong with that request. Please try again.