Function fetchUserFiles

Fetches files for the user.

If called from scratchpad or if the user does not have permission to access the project.