added authorization check for list and download files (only teachers are authorized)