Get user's uploaded files through his/her rights

Before, only the files which the user uploaded were shown. Now every file the
user can access is considered.