Merge "Use the right userId when setting restrictions" into nyc-dev