Hi,
I created a CRUD UI for several entities and i want to hide/show menu items based on the spring security based authentication. Can somone please tell me an efficeint way of doing this??
Thank you in advance.
Hi,
I created a CRUD UI for several entities and i want to hide/show menu items based on the spring security based authentication. Can somone please tell me an efficeint way of doing this??
Thank you in advance.
gvNIX menu addon can help you:
http://code.google.com/p/gvnix/wiki/DocMenu
Grant page access to roles from Roo shell.
Currently, for Roo 1.1.5 versions.
Mario Martínez Sánchez
Project Manager & Software Architect
--------------------------
Disid Technologies S.L.
http://www.disid.com
--------------------------
gvNIX
http://gvnix.googlecode.com
http://www.gvnix.org
Ken Rimple
Chariot Solutions
email: krimple@chariotsolutions.com
work: www.chariotsolutions.com/education
personal: www.rimple.com
Author: Spring Roo in Action (Manning)
MEAP Site: manning.com/rimple
Hi,
thank you for replying. I installed spring security configuraton and implmented the login page using an external database. Where should i used the taglibs??? I tried to edit menu.jspx using the 'authorize' to wrap the menu items. But it didn't work.
Ken Rimple
Chariot Solutions
email: krimple@chariotsolutions.com
work: www.chariotsolutions.com/education
personal: www.rimple.com
Author: Spring Roo in Action (Manning)
MEAP Site: manning.com/rimple
this is the code snippet of menu.jspx
when i login as an admin user, home page is shown without a left menu bar. At the same time an exception occurred as shown below. The other menu item is also not visible.<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<div xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:menu="urn:jsptagdir:/WEB-INF/tags/menu" id="menu" version="2.0">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<jsp:output omit-xml-declaration="yes"/>
<menu:menu id="_menu" z="nZaf43BjUg1iM0v70HJVEsXDopc=">
<sec:authorize ifAllGranted="ROLE_ADMIN">
<menu:category id="c_topping" z="Xm13w68rCIyzL6WIzqBtcpfiNQU=">
<menu:item id="i_topping_new" messageCode="global_menu_new" url="/toppings?form" z="e1a5iGUXU+AnmE3TsSiRG0anau4="/>
<menu:item id="i_topping_list" messageCode="global_menu_list" url="/toppings?page=1&size=${empty param.size ? 10 : param.size}" z="XzlIdR9bro/F4JpeR+A0AAJ/u7g="/>
</menu:category>
</sec:authorize>
<menu:category id="c_pizza" z="mXqKC1ELexS039/pkkCrZVcSry0=">
<menu:item id="i_pizza_new" messageCode="global_menu_new" url="/pizzas?form" z="FJyKGGTINgIyGIqDihlwLSFEytE="/>
<menu:item id="i_pizza_list" messageCode="global_menu_list" url="/pizzas?page=1&size=${empty param.size ? 10 : param.size}" z="xeipeDE0x1I+04qwdIrWrLg/6lc="/>
</menu:category>
</menu:menu>
</div>
org.apache.jasper.JasperException: /WEB-INF/views/menu.jspx(6,43) The prefix "sec" for element "sec:
authorize" is not bound.
Hi,
i just noticed that i haven't includedpart in the xml.xmlns:sec="http://www.springframework.org/security/tags"
Anyway thanx a lot for replying.![]()
![]()
No problem. Was going to point that out as it is a common mistake but you got to it first. Glad to hear you have it working...
Ken Rimple
Chariot Solutions
email: krimple@chariotsolutions.com
work: www.chariotsolutions.com/education
personal: www.rimple.com
Author: Spring Roo in Action (Manning)
MEAP Site: manning.com/rimple