Moved checkAccess method to fix build issues.