-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi, Im using spring-3.0.0.RC2 and spring-security-3.0.0.RC1.
I'm trying to use security tags in my zul pages and I'm having errors. In spring-security-3.0.0.RC1 they changed package names... and ClassNotFoundException is thrown. I updated the zkspring jar to 1.2.0-RC version and the problem persists.
Could someone help me? Someone knows about some versions of zkspring compatible with spring-security-3?
Thank you.
Fixed,
I created my security.tld and I customized the SecurityUtils.java contained in zkspring.jar to use spring-security-3.0.0.RC1 resources .
Regards.
João Alguineiro.
Hi, firstly I copied the security.tld to /WEB-INF/tld/.
Then I changed <function-class>org.springframework.security....</function-class> to
<function-class>com.green.soft.zk.spring.security.SecurityUtil</function-class>
I created a copy of SecurityUtils.java and I made customizations, like these.
zul file (example of isAllGranted method)
<?taglib uri="/WEB-INF/tld/security.tld" prefix="sec" ?> ... <zk if="${sec:isAllGranted('ROLE_AUTO_MOBILE')}"> <menu label="${c:l('global.auto.mobile')}"> <menupopup> <menuitem id="maintainCarEntryPoint" label="${c:l('global.car')}" apply="com.green.soft.composer.MaintainCarComposer"/> </menupopup> </menu> </zk>
security.tld (example of isAllGranted method)
<function> <name>isAllGranted</name> <function-class>com.green.soft.zk.spring.security.SecurityUtil</function-class> <function-signature>boolean isAllGranted(java.lang.String authorities) {</function-signature> <description>Return true if the authenticated principal is granted authorities of ALL the specified roles.</description> </function>
SecurityUtils.java (example of isAllGranted method)
public static boolean isAllGranted(String authorities) { if (null == authorities || "".equals(authorities)) { return false; } final Collection granted = getPrincipalAuthorities(); return granted.containsAll(parseAuthoritiesString(authorities)); }
I would like to attach the files but I dont know how to do this hare. Send an email ([email protected]) then I will pass you the files.
Regards,
João Alguineiro
Thai, I sent the files for you.
Regards,
João Alguineiro
Asked: 2009-12-22 16:50:09 +0800
Seen: 1,501 times
Last updated: Jan 28 '10