fix logging; add test for checkPermission BC#46420383-test-normal-add-test