是否可以使用Spring Security定义对GORM方法(例如保存,删除,更新)的访问?
我看过ACL的插件文档,但是,尽管我认为该插件允许我定义访问权限,但我不清楚如何做到这一点。
ACL的文件:http://burtbeckwith.github.com/grails-spring-security-acl/docs/manual/guide/single.pdf
注意:文档中的示例分别定义对类实例的访问。我想在类里面定义它们。
最佳答案
不知道如何用grails准确地做,但是您应该为域对象写安全的切入点
<global-method-security pre-post-annotations="enabled">
<!-- Block anything ending with the word 'Controller'-->
<protect-pointcut expression="execution(* my.pkg.*Domain.*(..))" access="NON_EXISTANT_ROLE"/>
</global-method-security>
关于grails - 使用Spring Security限制对Grails中的域类gorm方法的访问,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12047664/