move hasAccess logic in separate methods