use auth utils instead of hardcoded sql
Merge pull request #1601 from marcel-blonk/PLFM-3076

use auth utils instead of hardcoded sql