Modify

Opened 8 years ago

Last modified 9 months ago

#1273 assigned enhancement

Multiple & Exclude Permissions

Reported by: cyrano423@… Owned by: rjollos
Priority: normal Component: NavAddPlugin
Severity: normal Keywords:
Cc: rjollos Trac Release: 0.10

Description

Great plugin! I use it extensively.

It would be nice to have the ability to assign the item to multiple users (comma delimited list). Also, the ability to exclude certain users (for example: this button should not show for TRAC_ADMIN).

<item>.perm = <permission>

to

<item>.include = <permission 1>,<permission 2>,<permission 2>
<item>.exclude = <permission 1>,<permission 2>

Attachments (1)

notperm.patch (673 bytes) - added by egagnon@… 7 years ago.
Patch to allow exclusion based on permission (*.notperm = PERMISSION)

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by egagnon@…

Patch to allow exclusion based on permission (*.notperm = PERMISSION)

comment:1 Changed 7 years ago by egagnon@…

I have attached a patch which allows to exclude users. I use this patch on http://sablecc.org to provide a fake New Ticket item to anonymous users.

IMPORTANT: I have noticed that the patch causes unreliable display when an item has no *.notperm entry. So, for items which should not be excluded for any user, you should add: *.notperm = NONE in your trac.ini file.

Here is an example:

[navadd]
add_items = fakenewticket,download
fakenewticket.target = mainnav
fakenewticket.title = New Ticket
fakenewticket.url = /wiki/CreateAccount
fakenewticket.notperm = WIKI_MODIFY
download.target = mainnav
download.title = Download
download.url = /wiki/DownloadPage
download.notperm = NONE

comment:2 Changed 5 years ago by rjollos

  • Cc rjollos added

comment:3 Changed 9 months ago by rjollos

  • Owner changed from otaku42 to rjollos
  • Status changed from new to assigned

Add Comment

Modify Ticket

Action
as assigned .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.