'Check if current user or public has access to view or menu'

def has_access(self, permission_name, view_name):

    if current_user.is_authenticated():
        return self._has_view_access(g.user, permission_name, view_name)
    else:
        return self.is_item_public(permission_name, view_name)
