RF-13549: fix authorization checking