Lets say there are resources like the files. Who, when, where have an access to the individual file is not a problem. Assume that there is a resource like a directory which has its own attributes and contain other files, directories and/or some other items. Now there is a user which have an access to a directory but does not have access (even to see the name/title) to some of the files or sub-diectories.
How to filter the directory to contain only the files which a user may access, if the policy decision is separated from a business logic. Should I check each file individually?
If yes then if the directory contains 10M files and user has access only to a couple of files how to identify that files?