miércoles, 13 de abril de 2011

filter en métodos "finder" (Liferay)

A partir de la versión 6 los métodos "finderByXXXX" pueden ser filtrados por permisos, cómo conseguirlo, aquí la solución:

http://issues.liferay.com/browse/lPS-9554


Resumen:
New methods will be autogenerated:

filterFindBy
filterCountBy etc

These methods will only be generated if :

1.) the bean has a simple primitive pk

2.) the bean has permission checke registered in resource-actions/....xml

3.) the bean has user id an group id fields

4.) the finder method has group id in it

May relax it in the future to generate more, but for now, these seem good.

domingo, 3 de abril de 2011