samedi 21 février 2015

How @PostFilter and @PreFilter work

Being new to spring annotations, I need a clarification for the below code.



@PostFilter("hasPermission(filterObject, 'READ') or hasRole('ROLE_ADMIN')")

public List<User> getUsers(String orderByInsertionDate,
Integer numberDaysToLookBack) throws AppException


;


So this means that the list of users returned by getUsers will only contain those elements which have full "READ" access to the calling object or the calling object has role as "ROLE_ADMIN". Thanks.


Aucun commentaire:

Enregistrer un commentaire