Changes to queries to respect XACML permissions.