(bug 18195) Allow changing preferences via API