I have a question about spring security acl.
I have my class I have a preautorize methods and works well
@PreAuthorize("hasPermission(#test, write) or hasAnyRole('ROLE_ADMIN', 'ROLE_SUPERADMIN')") public void update(Test test) { testRepository.save(test); updateDeviceAcl(test); } But when I want do same thing on list:
@PreAuthorize("hasPermission(#test, write) or hasAnyRole('ROLE_ADMIN', 'ROLE_SUPERADMIN')") public void update(List<Test> test) { testRepository.save(test); updateDeviceAcl(test); } It trow exception:
java.lang.NoSuchMethodException: java.util.ArrayList.getId() Is it possible do it this way? I fully understand, that method
ArrayList.getId()
should be something like that
test.get(i).getId();
Thanks for answer