15886 cannot delete query

[``* `#15886` Permission to manage public queries not respected``](http://www.openproject.org/work_packages/15886)

Fixes a bug introduced by #1979