简体   繁体   English

我可以在ZKGrails作曲家中使用Spring Security注释吗?

[英]Can I use Spring Security annotations in ZKGrails composers?

Can I use Spring Security annotations in my ZKGrails composers to secure the ajax-callbacks, or can/do i have to inject springSecurityService (and check the principal's authorities, in every method manually)? 我可以在ZKGrails作曲家中使用Spring Security批注来保护Ajax回调,还是可以/必须注入springSecurityService(并手动检查每种方法的主体权限)?

Update: According to http://felipecypriano.com/2009/10/26/tweak-zk-to-make-event-processing-call-groovys-invokemethod/ , the annotations should work, and I found the modification mentioned in this post in the current ZKGrails plugin version (1.0.4). 更新:根据http://felipecypriano.com/2009/10/26/tweak-zk-to-make-event-processing-call-groovys-invokemethod/ ,注释应该起作用,并且我发现本文提到的修改在当前ZKGrails插件版本(1.0.4)中发布。 Still, when I try to secure methods in my composer, they remain fully accessible. 不过,当我尝试在作曲家中保护方法时,它们仍然可以完全访问。

Because "@Secured" annotation is not supported by spring security plug-in. 因为Spring安全性插件不支持“ @Secured”注释。 I think you should implement your own method interceptor according http://felipecypriano.com/2009/10/19/enable-secured-annotation-with-grails-spring-security-plugin/ to enable it. 我认为您应该根据http://felipecypriano.com/2009/10/19/enable-secured-annotation-with-grails-spring-security-plugin/来实现自己的方法拦截器以启​​用它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM