corrected role check for test viewing