I have a document library with thousand of items distributed on a tree of folders. Each folder has its specific permissions (groups), so there's no inheritance of permissions in this case.
I'm using Object Model and a CAML to select the items (recursively) that the current user has permissions, but it is returning items even from folders I don't have permission (even though I have permission on the item itself).
The questions are:
Shouldn't the query respect the tree hierarchy regarding permissions? (If I don't have permission on the father, the permission on the leaf does not matter)
Is there any way to select the items respecting it? The solution to query first to select the folders I have access, and then select only the items on those folders does not work, given the number of items we have.
Thanks!