{"action":"created","issue":{"url":"https://api.github.com/repos/meteor/meteor/issues/3775","labels_url":"https://api.github.com/repos/meteor/meteor/issues/3775/labels{/name}","comments_url":"https://api.github.com/repos/meteor/meteor/issues/3775/comments","events_url":"https://api.github.com/repos/meteor/meteor/issues/3775/events","html_url":"https://github.com/meteor/meteor/issues/3775","id":58328818,"number":3775,"title":"Untrusted code may only update documents by ID when updating array element using $","user":{"login":"dandv","id":33569,"avatar_url":"https://avatars.githubusercontent.com/u/33569?v=3","gravatar_id":"","url":"https://api.github.com/users/dandv","html_url":"https://github.com/dandv","followers_url":"https://api.github.com/users/dandv/followers","following_url":"https://api.github.com/users/dandv/following{/other_user}","gists_url":"https://api.github.com/users/dandv/gists{/gist_id}","starred_url":"https://api.github.com/users/dandv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dandv/subscriptions","organizations_url":"https://api.github.com/users/dandv/orgs","repos_url":"https://api.github.com/users/dandv/repos","events_url":"https://api.github.com/users/dandv/events{/privacy}","received_events_url":"https://api.github.com/users/dandv/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-20T09:42:46Z","updated_at":"2015-02-20T20:43:36Z","closed_at":"2015-02-20T20:42:20Z","body":"A user I offered a [solution to on SO](http://stackoverflow.com/a/28466856/1269037) ran into this:\r\n\r\n    Company.update({_id: company._id, tags.tag: tagName}, {$inc: {tags.$.count: 1}});\r\n\r\n> Uncaught Error: Not permitted. Untrusted code may only update documents by ID.\r\n\r\nAlso found [a blog post](https://code4foodblog.wordpress.com/2015/02/11/meteor-uncaught-error-not-permitted-untrusted-code-may-only-update-documents-by-id-when-update-array-elementusing/) about it.\r\n\r\nSince the _id is specified, the error message may be misleading (if this isn't a Minimongo bug outright)."},"comment":{"url":"https://api.github.com/repos/meteor/meteor/issues/comments/75315774","html_url":"https://github.com/meteor/meteor/issues/3775#issuecomment-75315774","issue_url":"https://api.github.com/repos/meteor/meteor/issues/3775","id":75315774,"user":{"login":"glasser","id":16724,"avatar_url":"https://avatars.githubusercontent.com/u/16724?v=3","gravatar_id":"","url":"https://api.github.com/users/glasser","html_url":"https://github.com/glasser","followers_url":"https://api.github.com/users/glasser/followers","following_url":"https://api.github.com/users/glasser/following{/other_user}","gists_url":"https://api.github.com/users/glasser/gists{/gist_id}","starred_url":"https://api.github.com/users/glasser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glasser/subscriptions","organizations_url":"https://api.github.com/users/glasser/orgs","repos_url":"https://api.github.com/users/glasser/repos","events_url":"https://api.github.com/users/glasser/events{/privacy}","received_events_url":"https://api.github.com/users/glasser/received_events","type":"User","site_admin":false},"created_at":"2015-02-20T20:43:36Z","updated_at":"2015-02-20T20:43:36Z","body":"Yes, but that's unrelated to the issue being reported here."}}