fixed role check for test deletion