Last modified: 2014-10-19 17:52:24 UTC
Although "user" is treated correctly, the "permissions" object is currently written and returned directly from the JSON. It should also be stripped on create/update, and generated from the user column in populateAnnotation. This is for security reasons; as is the owner of the annotation can e.g. give update and admin rights to anyone.
Also, $annotation->user should start as an empty object (so there are no stray properties besides id and username).
Change 110378 had a related patch set uploaded by Chiborg: Remove permission info from JSON https://gerrit.wikimedia.org/r/110378