If using Hibernate, you can automatically run the acl schema against the db by adding this to persistence.xml
:
<property name="hibernate.hbm2ddl.import_files" value="/import.sql"/>
<property name="hibernate.hbm2ddl.import_files_sql_extractor" value="org.hibernate.tool.hbm2ddl.MultipleLinesSqlCommandExtractor" />
and adding the schema to /resources/import.sql
You can list all objects of type X with permission Y like this:
select
*
from acl_entry a
join acl_object_identity b on a.acl_object_identity = b.id
join acl_class c on b.object_id_class = c.id
where
class = X
and mask = Y
However, Spring Security ACL is fundamentally flawed in terms of Row Security, due to pagination issues. You should do Row Security in the database with views or built-in tools if your db supports them.