0 Replies Latest reply on Feb 14, 2010 4:02 PM by ssamayoagt

    Permission "catching"

      This is the scenario:

      I have a datagrid which has one each row a link action for edit and anoother for delete. The rendeding of those links are #{s:hasPermission('depto', 'editar')} and #{s:hasPermission('depto', 'borrar')}, in other words, check if the user has permission to edit and delete the entity named 'depto'.

      I have enabled hibernate SQL output and see that permission table is queried 18 for 3 record datatable, 6 times for each row! And to make it worse, the query retrieves each time ALL permisions of the "target" object ('depto'). This later isue is comprensible since the permission could be granted directrly to the logged user or indirectly via role.

      How permissions could be "catched" to avoid this? in the query component?