#1273 closed enhancement (wontfix)
Multiple & Exclude Permissions
Reported by: | Prasand J. | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | NavAddPlugin |
Severity: | normal | Keywords: | |
Cc: | Ryan J Ollos | 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)
Change History (6)
Changed 17 years ago by
Attachment: | notperm.patch added |
---|
comment:1 Changed 17 years ago by
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 15 years ago by
Cc: | Ryan J Ollos added; anonymous removed |
---|
comment:3 Changed 11 years ago by
Owner: | changed from Michael Renzmann to Ryan J Ollos |
---|---|
Status: | new → assigned |
comment:5 Changed 8 years ago by
Resolution: | → wontfix |
---|---|
Status: | assigned → closed |
The feature will be implemented in trac:#11078. Permissions can be defined in the trac:ExtraPermissionsProvider. Your request could be implemented with the current version of NavAddPlugin by defining a unique permission, associating it with a set of users and making the navigation item require the permission.
Patch to allow exclusion based on permission (*.notperm = PERMISSION)