fixed hasAccess and added test
Merge pull request #155 from joakimkejser/patch-1

fixed hasAccess and added test