#10133 closed defect (fixed)
menu item displayed as strange artifact when having no permission for it
Reported by: | falkb | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Component: | MenusPlugin |
Severity: | normal | Keywords: | |
Cc: | Ryan J Ollos | Trac Release: | 0.12 |
Description
Users without permission BROWSER_VIEW (and TIME_VIEW of TimingAndEstimationPlugin) actually should not see the appropriate menu items.
Please, hide those strange menu artifacts.
I added rjollos because it seems he's the current maintainer.
Attachments (1)
Change History (11)
Changed 12 years ago by
comment:1 follow-up: 4 Changed 12 years ago by
comment:2 Changed 12 years ago by
Owner: | changed from Catalin BALAN to Ryan J Ollos |
---|---|
Status: | new → assigned |
comment:4 follow-up: 8 Changed 12 years ago by
Replying to falkb:
It seems, the permissions are not checked correctly at rendering menu items...
I can't think of how the permission could be checked in a straightforward way, since all you've done is defined an entry, but no path_info
or other data to match it to a module. How does the MenusPlugin know, in a general way, that the browser
entry in trac.ini
is associated with the BrowserModule
and the path /browser
, and therefore should only be shown when the BROWSER_VIEW
permission is present? Do you see a way?
However, I will commit a fix that prevents the display of entries that don't result in a valid link element.
comment:5 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
comment:6 Changed 12 years ago by
comment:7 Changed 12 years ago by
comment:8 Changed 12 years ago by
comment:9 Changed 12 years ago by
Let me know if you've had a chance to test it out. I'm hesitant to touch the plugin again without setting up unit tests to make sure I'm not introducing regressions.
We found out the reason seems to be this setup in trac.ini:
Now as I removed both entries for billing and browser, the problem disappeared.
It seems, the permissions are not checked correctly at rendering menu items...