fileapi: Add support for user-wide queries

Fixes: #19168
13 files changed