Allow / disallow query execution through active record