Functions to check whether a user has perms on a report.