[#46476035] Make cancelable query work for non-superusers (including for file downloads)