We're running CakePHP 2.3...
We need to control access to PDF files. For example, we need users to be able to view/download their own PDF but not others. Admins can view them all. Etc.
The first question is where these files should live within CakePHP's directory structure.
We experimented with /webroot/files/... but it appears that these are publically accessible (ie, anyone can navigate directly to any file if they know the full path: www.example.com/files/private.pdf
Once the files are stored in a secure location, the second question is what is the best way to handle authorization so that the proper users can access the proper files.
It feels like CakePHP has some built in support for this, but we can't find documentation for it.