Change hasAccess function to a different name and signature to make it
more understandable. Update unit tests and add a new unit test for a
user who should not have access.