Upgrade entityreference (security)