History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SM-31
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Matt Raible
Reporter: Matt Raible
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Struts Menu

Error displaying items when the user has no permission

Created: 09/May/06 01:56 AM   Updated: 07/Dec/07 01:32 PM
Component/s: Displayers
Affects Version/s: 2.3
Fix Version/s: 2.5

File Attachments: 1. Text File patch.txt (12 kb)



 Description  « Hide
Moved from SourceForge http://sourceforge.net/tracker/index.php?func=detail&aid=1105443&group_id=48726&atid=453974:

When using DropDown menu
(net.sf.navigator.displayer.DropDownMenuDisplayer) and
security, if the user is not allowed to see an item a
"null" is printed on the browser.

I found the the root problem was caused by a property
not being defined in the file
net.sf.navigator.displayer.DisplayerStrings.properties.

I fixed it by adding the following line to the
DisplayerStrings.properties file

dd.link.restricted=<label
style\="cursor\:crosshair;font-family\:verdana;font-size\:10px"
onmouseover\="this.style.color\='red'"
onmouseout\="this.style.color\='black'"
onclick\="return false"> {2} </label>

Best Regards,
Andres Bernasconi - Sotretus

Download attachment at http://sourceforge.net/tracker/download.php?group_id=48726&atid=453974&file_id=116406&aid=1105443

 All   Comments   Change History   FishEye      Sort Order:
Mike Jennings - 07/Dec/07 01:32 PM
I am attaching a patch to fix the issue described above.

The patch also includes logic to allow a user to provide a new showAuthItem value in the menu-config.xml. This value works with the roles value, and if a user is not authorized to view the menu item and the showAuthItem value is set to false, then the menu item is hidden. The showAuthItem defaults to true as a default and will display the menu or menu item.

Fix has also been included to better display a non-authorized menu item.

Mike Jennings - 07/Dec/07 01:32 PM
Patch for issue above