My question is : Is that possible to secure a domain object method and even dynamic methods like findByName?
It works very well on service methods but I can't make it work on a domain instance method or domain static method.
class Dummy {
string name
@PostFilter("hasPermission(filterObject, read)")
static List<Dummy> listDummies(){
Dummy.list();
}
}
When called from a controller, the listDummies returns all dummies even when no user is connected.
How could I do for this to work?
Thanks in advance for the help you could provide.