{"action":"created","comment":{"url":"https://api.github.com/repos/flywheel-io/core/pulls/comments/211705880","pull_request_review_id":148184753,"id":211705880,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTcwNTg4MA==","diff_hunk":"@@ -64,8 +64,10 @@ def propagate_changes(cont_name, cont_ids, query, update, include_refs=False):\n \n     if include_refs:\n         analysis_query = copy.deepcopy(query)\n+        analysis_update = copy.deepcopy(update)\n+        analysis_update.pop('permissions', None)\n         analysis_query.update({'parent.type': singularize(cont_name), 'parent.id': {'$in': cont_ids}})\n-        config.db.analyses.update_many(analysis_query, update)\n+        config.db.analyses.update_many(analysis_query, analysis_update)","path":"api/dao/containerutil.py","position":8,"original_position":8,"commit_id":"2375873bd312d00991a52a3e130e266bbf68a10b","original_commit_id":"2375873bd312d00991a52a3e130e266bbf68a10b","user":{"login":"hkethi002","id":15849861,"node_id":"MDQ6VXNlcjE1ODQ5ODYx","avatar_url":"https://avatars0.githubusercontent.com/u/15849861?v=4","gravatar_id":"","url":"https://api.github.com/users/hkethi002","html_url":"https://github.com/hkethi002","followers_url":"https://api.github.com/users/hkethi002/followers","following_url":"https://api.github.com/users/hkethi002/following{/other_user}","gists_url":"https://api.github.com/users/hkethi002/gists{/gist_id}","starred_url":"https://api.github.com/users/hkethi002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkethi002/subscriptions","organizations_url":"https://api.github.com/users/hkethi002/orgs","repos_url":"https://api.github.com/users/hkethi002/repos","events_url":"https://api.github.com/users/hkethi002/events{/privacy}","received_events_url":"https://api.github.com/users/hkethi002/received_events","type":"User","site_admin":false},"body":"The permissions key is being popped off the analysis_update a couple lines above","created_at":"2018-08-21T18:11:08Z","updated_at":"2018-08-21T18:11:08Z","html_url":"https://github.com/flywheel-io/core/pull/1363#discussion_r211705880","pull_request_url":"https://api.github.com/repos/flywheel-io/core/pulls/1363","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/flywheel-io/core/pulls/comments/211705880"},"html":{"href":"https://github.com/flywheel-io/core/pull/1363#discussion_r211705880"},"pull_request":{"href":"https://api.github.com/repos/flywheel-io/core/pulls/1363"}},"in_reply_to_id":211683257},"pull_request":{"url":"https://api.github.com/repos/flywheel-io/core/pulls/1363","id":209002018,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MDAyMDE4","html_url":"https://github.com/flywheel-io/core/pull/1363","diff_url":"https://github.com/flywheel-io/core/pull/1363.diff","patch_url":"https://github.com/flywheel-io/core/pull/1363.patch","issue_url":"https://api.github.com/repos/flywheel-io/core/issues/1363","number":1363,"state":"open","locked":false,"title":"Sdk gear rules","user":{"login":"hkethi002","id":15849861,"node_id":"MDQ6VXNlcjE1ODQ5ODYx","avatar_url":"https://avatars0.githubusercontent.com/u/15849861?v=4","gravatar_id":"","url":"https://api.github.com/users/hkethi002","html_url":"https://github.com/hkethi002","followers_url":"https://api.github.com/users/hkethi002/followers","following_url":"https://api.github.com/users/hkethi002/following{/other_user}","gists_url":"https://api.github.com/users/hkethi002/gists{/gist_id}","starred_url":"https://api.github.com/users/hkethi002/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hkethi002/subscriptions","organizations_url":"https://api.github.com/users/hkethi002/orgs","repos_url":"https://api.github.com/users/hkethi002/repos","events_url":"https://api.github.com/users/hkethi002/events{/privacy}","received_events_url":"https://api.github.com/users/hkethi002/received_events","type":"User","site_admin":false},"body":"### Changes\r\n- new key for projects, sessions, acquisitions, and analyses: `parents`\r\n  - ```parents: {project: projectId, group: groupId, ...}```\r\n  - Containers will only have the applicable keys in `parents`\r\n- New type of job api key\r\n  - stores takes a `scope: {level: cont_type, id: cont_id, access: permission level}`\r\n- jobs with tag `auto` that have an api key input get the above type of key\r\n  - scope is set to `{level: project, id: projectId, access: ro}`\r\n- auth layer checks for handler.scope (which is set from the api key)\r\n\r\n__Note__: The allow read-only sdk gears as rules is not in this PR\r\n\r\n### Review Checklist\r\n\r\n- Tests were added to cover all code changes\r\n- Documentation was added / updated\r\n- Code and tests follow standards in CONTRIBUTING.md\r\n","created_at":"2018-08-16T22:30:42Z","updated_at":"2018-08-21T18:11:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0fcc0f11e77abc6541667787fc4044f9a629028","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kofalt","id":265071,"node_id":"MDQ6VXNlcjI2NTA3MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/265071?v=4","gravatar_id":"","url":"https://api.github.com/users/kofalt","html_url":"https://github.com/kofalt","followers_url":"https://api.github.com/users/kofalt/followers","following_url":"https://api.github.com/users/kofalt/following{/other_user}","gists_url":"https://api.github.com/users/kofalt/gists{/gist_id}","starred_url":"https://api.github.com/users/kofalt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kofalt/subscriptions","organizations_url":"https://api.github.com/users/kofalt/orgs","repos_url":"https://api.github.com/users/kofalt/repos","events_url":"https://api.github.com/users/kofalt/events{/privacy}","received_events_url":"https://api.github.com/users/kofalt/received_events","type":"User","site_admin":false},{"login":"nagem","id":5702596,"node_id":"MDQ6VXNlcjU3MDI1OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/5702596?v=4","gravatar_id":"","url":"https://api.github.com/users/nagem","html_url":"https://github.com/nagem","followers_url":"https://api.github.com/users/nagem/followers","following_url":"https://api.github.com/users/nagem/following{/other_user}","gists_url":"https://api.github.com/users/nagem/gists{/gist_id}","starred_url":"https://api.github.com/users/nagem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nagem/subscriptions","organizations_url":"https://api.github.com/users/nagem/orgs","repos_url":"https://api.github.com/users/nagem/repos","events_url":"https://api.github.com/users/nagem/events{/privacy}","received_events_url":"https://api.github.com/users/nagem/received_events","type":"User","site_admin":false},{"login":"ambrussimon","id":25747407,"node_id":"MDQ6VXNlcjI1NzQ3NDA3","avatar_url":"https://avatars2.githubusercontent.com/u/25747407?v=4","gravatar_id":"","url":"https://api.github.com/users/ambrussimon","html_url":"https://github.com/ambrussimon","followers_url":"https://api.github.com/users/ambrussimon/followers","following_url":"https://api.github.com/users/ambrussimon/following{/other_user}","gists_url":"https://api.github.com/users/ambrussimon/gists{/gist_id}","starred_url":"https://api.github.com/users/ambrussimon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambrussimon/subscriptions","organizations_url":"https://api.github.com/users/ambrussimon/orgs","repos_url":"https://api.github.com/users/ambrussimon/repos","events_url":"https://api.github.com/users/ambrussimon/events{/privacy}","received_events_url":"https://api.github.com/users/ambrussimon/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/flywheel-io/core/pulls/1363/commits","review_comments_url":"https://api.github.com/repos/flywheel-io/core/pulls/1363/comments","review_comment_url":"https://api.github.com/repos/flywheel-io/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flywheel-io/core/issues/1363/comments","statuses_url":"https://api.github.com/repos/flywheel-io/core/statuses/2375873bd312d00991a52a3e130e266bbf68a10b","head":{"label":"flywheel-io:sdk-gear-rules","ref":"sdk-gear-rules","sha":"2375873bd312d00991a52a3e130e266bbf68a10b","user":{"login":"flywheel-io","id":10966633,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTY2NjMz","avatar_url":"https://avatars0.githubusercontent.com/u/10966633?v=4","gravatar_id":"","url":"https://api.github.com/users/flywheel-io","html_url":"https://github.com/flywheel-io","followers_url":"https://api.github.com/users/flywheel-io/followers","following_url":"https://api.github.com/users/flywheel-io/following{/other_user}","gists_url":"https://api.github.com/users/flywheel-io/gists{/gist_id}","starred_url":"https://api.github.com/users/flywheel-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flywheel-io/subscriptions","organizations_url":"https://api.github.com/users/flywheel-io/orgs","repos_url":"https://api.github.com/users/flywheel-io/repos","events_url":"https://api.github.com/users/flywheel-io/events{/privacy}","received_events_url":"https://api.github.com/users/flywheel-io/received_events","type":"Organization","site_admin":false},"repo":{"id":126420249,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY0MjAyNDk=","name":"core","full_name":"flywheel-io/core","owner":{"login":"flywheel-io","id":10966633,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTY2NjMz","avatar_url":"https://avatars0.githubusercontent.com/u/10966633?v=4","gravatar_id":"","url":"https://api.github.com/users/flywheel-io","html_url":"https://github.com/flywheel-io","followers_url":"https://api.github.com/users/flywheel-io/followers","following_url":"https://api.github.com/users/flywheel-io/following{/other_user}","gists_url":"https://api.github.com/users/flywheel-io/gists{/gist_id}","starred_url":"https://api.github.com/users/flywheel-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flywheel-io/subscriptions","organizations_url":"https://api.github.com/users/flywheel-io/orgs","repos_url":"https://api.github.com/users/flywheel-io/repos","events_url":"https://api.github.com/users/flywheel-io/events{/privacy}","received_events_url":"https://api.github.com/users/flywheel-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flywheel-io/core","description":"Data Management API and SDK based upon scitran/core","fork":false,"url":"https://api.github.com/repos/flywheel-io/core","forks_url":"https://api.github.com/repos/flywheel-io/core/forks","keys_url":"https://api.github.com/repos/flywheel-io/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flywheel-io/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flywheel-io/core/teams","hooks_url":"https://api.github.com/repos/flywheel-io/core/hooks","issue_events_url":"https://api.github.com/repos/flywheel-io/core/issues/events{/number}","events_url":"https://api.github.com/repos/flywheel-io/core/events","assignees_url":"https://api.github.com/repos/flywheel-io/core/assignees{/user}","branches_url":"https://api.github.com/repos/flywheel-io/core/branches{/branch}","tags_url":"https://api.github.com/repos/flywheel-io/core/tags","blobs_url":"https://api.github.com/repos/flywheel-io/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flywheel-io/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flywheel-io/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/flywheel-io/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flywheel-io/core/statuses/{sha}","languages_url":"https://api.github.com/repos/flywheel-io/core/languages","stargazers_url":"https://api.github.com/repos/flywheel-io/core/stargazers","contributors_url":"https://api.github.com/repos/flywheel-io/core/contributors","subscribers_url":"https://api.github.com/repos/flywheel-io/core/subscribers","subscription_url":"https://api.github.com/repos/flywheel-io/core/subscription","commits_url":"https://api.github.com/repos/flywheel-io/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/flywheel-io/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/flywheel-io/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/flywheel-io/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/flywheel-io/core/contents/{+path}","compare_url":"https://api.github.com/repos/flywheel-io/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flywheel-io/core/merges","archive_url":"https://api.github.com/repos/flywheel-io/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flywheel-io/core/downloads","issues_url":"https://api.github.com/repos/flywheel-io/core/issues{/number}","pulls_url":"https://api.github.com/repos/flywheel-io/core/pulls{/number}","milestones_url":"https://api.github.com/repos/flywheel-io/core/milestones{/number}","notifications_url":"https://api.github.com/repos/flywheel-io/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flywheel-io/core/labels{/name}","releases_url":"https://api.github.com/repos/flywheel-io/core/releases{/id}","deployments_url":"https://api.github.com/repos/flywheel-io/core/deployments","created_at":"2018-03-23T02:12:39Z","updated_at":"2018-08-20T18:13:31Z","pushed_at":"2018-08-21T14:06:28Z","git_url":"git://github.com/flywheel-io/core.git","ssh_url":"git@github.com:flywheel-io/core.git","clone_url":"https://github.com/flywheel-io/core.git","svn_url":"https://github.com/flywheel-io/core","homepage":null,"size":15824,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":107,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":107,"watchers":0,"default_branch":"master"}},"base":{"label":"flywheel-io:master","ref":"master","sha":"a44971ef510998f0c1d2a4466041152acc8a1633","user":{"login":"flywheel-io","id":10966633,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTY2NjMz","avatar_url":"https://avatars0.githubusercontent.com/u/10966633?v=4","gravatar_id":"","url":"https://api.github.com/users/flywheel-io","html_url":"https://github.com/flywheel-io","followers_url":"https://api.github.com/users/flywheel-io/followers","following_url":"https://api.github.com/users/flywheel-io/following{/other_user}","gists_url":"https://api.github.com/users/flywheel-io/gists{/gist_id}","starred_url":"https://api.github.com/users/flywheel-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flywheel-io/subscriptions","organizations_url":"https://api.github.com/users/flywheel-io/orgs","repos_url":"https://api.github.com/users/flywheel-io/repos","events_url":"https://api.github.com/users/flywheel-io/events{/privacy}","received_events_url":"https://api.github.com/users/flywheel-io/received_events","type":"Organization","site_admin":false},"repo":{"id":126420249,"node_id":"MDEwOlJlcG9zaXRvcnkxMjY0MjAyNDk=","name":"core","full_name":"flywheel-io/core","owner":{"login":"flywheel-io","id":10966633,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEwOTY2NjMz","avatar_url":"https://avatars0.githubusercontent.com/u/10966633?v=4","gravatar_id":"","url":"https://api.github.com/users/flywheel-io","html_url":"https://github.com/flywheel-io","followers_url":"https://api.github.com/users/flywheel-io/followers","following_url":"https://api.github.com/users/flywheel-io/following{/other_user}","gists_url":"https://api.github.com/users/flywheel-io/gists{/gist_id}","starred_url":"https://api.github.com/users/flywheel-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flywheel-io/subscriptions","organizations_url":"https://api.github.com/users/flywheel-io/orgs","repos_url":"https://api.github.com/users/flywheel-io/repos","events_url":"https://api.github.com/users/flywheel-io/events{/privacy}","received_events_url":"https://api.github.com/users/flywheel-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flywheel-io/core","description":"Data Management API and SDK based upon scitran/core","fork":false,"url":"https://api.github.com/repos/flywheel-io/core","forks_url":"https://api.github.com/repos/flywheel-io/core/forks","keys_url":"https://api.github.com/repos/flywheel-io/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flywheel-io/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flywheel-io/core/teams","hooks_url":"https://api.github.com/repos/flywheel-io/core/hooks","issue_events_url":"https://api.github.com/repos/flywheel-io/core/issues/events{/number}","events_url":"https://api.github.com/repos/flywheel-io/core/events","assignees_url":"https://api.github.com/repos/flywheel-io/core/assignees{/user}","branches_url":"https://api.github.com/repos/flywheel-io/core/branches{/branch}","tags_url":"https://api.github.com/repos/flywheel-io/core/tags","blobs_url":"https://api.github.com/repos/flywheel-io/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flywheel-io/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flywheel-io/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/flywheel-io/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flywheel-io/core/statuses/{sha}","languages_url":"https://api.github.com/repos/flywheel-io/core/languages","stargazers_url":"https://api.github.com/repos/flywheel-io/core/stargazers","contributors_url":"https://api.github.com/repos/flywheel-io/core/contributors","subscribers_url":"https://api.github.com/repos/flywheel-io/core/subscribers","subscription_url":"https://api.github.com/repos/flywheel-io/core/subscription","commits_url":"https://api.github.com/repos/flywheel-io/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/flywheel-io/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/flywheel-io/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/flywheel-io/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/flywheel-io/core/contents/{+path}","compare_url":"https://api.github.com/repos/flywheel-io/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flywheel-io/core/merges","archive_url":"https://api.github.com/repos/flywheel-io/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flywheel-io/core/downloads","issues_url":"https://api.github.com/repos/flywheel-io/core/issues{/number}","pulls_url":"https://api.github.com/repos/flywheel-io/core/pulls{/number}","milestones_url":"https://api.github.com/repos/flywheel-io/core/milestones{/number}","notifications_url":"https://api.github.com/repos/flywheel-io/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flywheel-io/core/labels{/name}","releases_url":"https://api.github.com/repos/flywheel-io/core/releases{/id}","deployments_url":"https://api.github.com/repos/flywheel-io/core/deployments","created_at":"2018-03-23T02:12:39Z","updated_at":"2018-08-20T18:13:31Z","pushed_at":"2018-08-21T14:06:28Z","git_url":"git://github.com/flywheel-io/core.git","ssh_url":"git@github.com:flywheel-io/core.git","clone_url":"https://github.com/flywheel-io/core.git","svn_url":"https://github.com/flywheel-io/core","homepage":null,"size":15824,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":107,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":107,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flywheel-io/core/pulls/1363"},"html":{"href":"https://github.com/flywheel-io/core/pull/1363"},"issue":{"href":"https://api.github.com/repos/flywheel-io/core/issues/1363"},"comments":{"href":"https://api.github.com/repos/flywheel-io/core/issues/1363/comments"},"review_comments":{"href":"https://api.github.com/repos/flywheel-io/core/pulls/1363/comments"},"review_comment":{"href":"https://api.github.com/repos/flywheel-io/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flywheel-io/core/pulls/1363/commits"},"statuses":{"href":"https://api.github.com/repos/flywheel-io/core/statuses/2375873bd312d00991a52a3e130e266bbf68a10b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"hkethi002"}}