Fix unittests adopting new permissions structure.