AcegiSecurity Plugin - Service Method Security

Experimental support for securing your Service methods with Annotations, e.g.

import org.springframework.security.annotation.Secured;

class SomeService {
  static transactional = true
  static scope = "request"

  @Secured(["ROLE_SUPERVISOR"])
  def getSome(){
    println "getSome()"
    return "this method is for ROLE_SUPERVISOR Only"
  }
  @Secured(["ROLE_USER"])
  def doSome(){
    println "doSome() method for ROLE_USER"
    return "this method is for ROLE_USER Only"
  }
}
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.