This is an example grails project to show some features of the Spring security Plugins (Core + ACL) for implementing method security in services. It's the source I used for writing the blog post Getting Started with method security in Grails using Spring Security
Relevant files are:
NoteService
, the service with secured methods
grails-app/services/com/mscharhag/NoteService.groovy
NoteServiceTests
, test class for testing method security features
test/integration/com/mscharhag/NoteServiceTests.groovy
Bean configuration
grails-app/conf/spring/resources.groovy
Beans used for security constraint implementation
src/groovy/com/mscharhag/GrailsBeanResolver.groovy
src/groovy/com/mscharhag/GrailsExpressionHandler.groovy
src/groovy/com/mscharhag/GrailsPermissionEvaluator.groovy
grails-app/services/com/mscharhag/SecurityService.groovy
Note
and User
, two domain classes used by NoteService
grails-app/domain/com/mscharhag/Note.groovy
grails-app/domain/com/mscharhag/User.groovy
(The other files have been generated by Grails and haven't change)