{"action":"created","comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/62128061","id":62128061,"diff_hunk":"@@ -95,9 +95,11 @@ const MediaModalSecondaryActions = React.createClass( {\n \t\t\t} );\n \t\t}\n \n-\t\tconst canDeleteItems = selectedItems.length && every( selectedItems, ( item ) => {\n-\t\t\treturn canUserDeleteItem( item, user, site );\n-\t\t} );\n+\t\tconst canDeleteItems = ModalViews.EDIT !== activeView &&","path":"client/post-editor/media-modal/secondary-actions.jsx","position":7,"original_position":7,"commit_id":"c744aa7ebe49554f1e20f7bf1d8546885f382f68","original_commit_id":"c744aa7ebe49554f1e20f7bf1d8546885f382f68","user":{"login":"gwwar","id":1270189,"avatar_url":"https://avatars.githubusercontent.com/u/1270189?v=3","gravatar_id":"","url":"https://api.github.com/users/gwwar","html_url":"https://github.com/gwwar","followers_url":"https://api.github.com/users/gwwar/followers","following_url":"https://api.github.com/users/gwwar/following{/other_user}","gists_url":"https://api.github.com/users/gwwar/gists{/gist_id}","starred_url":"https://api.github.com/users/gwwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gwwar/subscriptions","organizations_url":"https://api.github.com/users/gwwar/orgs","repos_url":"https://api.github.com/users/gwwar/repos","events_url":"https://api.github.com/users/gwwar/events{/privacy}","received_events_url":"https://api.github.com/users/gwwar/received_events","type":"User","site_admin":false},"body":"Since the active view doesn't change a user's capabilities, lets move this down below instead. Maybe something like:\r\n```\r\nif ( ! includes( [ ModalViews.GALLERY, ModalViews.EDIT ], activeView ) && canDeleteItems )\r\n```","created_at":"2016-05-04T22:50:47Z","updated_at":"2016-05-04T22:50:47Z","html_url":"https://github.com/Automattic/wp-calypso/pull/5218#discussion_r62128061","pull_request_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5218","_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments/62128061"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/5218#discussion_r62128061"},"pull_request":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5218"}}},"pull_request":{"url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5218","id":68916285,"html_url":"https://github.com/Automattic/wp-calypso/pull/5218","diff_url":"https://github.com/Automattic/wp-calypso/pull/5218.diff","patch_url":"https://github.com/Automattic/wp-calypso/pull/5218.patch","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5218","number":5218,"state":"open","locked":false,"title":"Image editor: Uploading and rotating/flipping images from the local file system","user":{"login":"robobot3000","id":800604,"avatar_url":"https://avatars.githubusercontent.com/u/800604?v=3","gravatar_id":"","url":"https://api.github.com/users/robobot3000","html_url":"https://github.com/robobot3000","followers_url":"https://api.github.com/users/robobot3000/followers","following_url":"https://api.github.com/users/robobot3000/following{/other_user}","gists_url":"https://api.github.com/users/robobot3000/gists{/gist_id}","starred_url":"https://api.github.com/users/robobot3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robobot3000/subscriptions","organizations_url":"https://api.github.com/users/robobot3000/orgs","repos_url":"https://api.github.com/users/robobot3000/repos","events_url":"https://api.github.com/users/robobot3000/events{/privacy}","received_events_url":"https://api.github.com/users/robobot3000/received_events","type":"User","site_admin":false},"body":"Issue #2098\r\n\r\n* Hidden behind \"image-editor\" flag\r\n* Adds the image editor view, containing rotate and flip options\r\n![3](https://cloud.githubusercontent.com/assets/800604/15026147/de93710c-1234-11e6-8eaa-bdfb6aa00fb9.png)\r\n* Adds \"Edit image\" button to the image details modal - saving doesn't work at the moment due to the cross origin requests\r\n![1](https://cloud.githubusercontent.com/assets/800604/15026143/d6b7e468-1234-11e6-8fbc-87e678057189.png)\r\n* Adds \"Add and edit image\" to the top of media gallery - at the moment this is just for presentation purposes and allows to drag & drop image files into the editor. Images edited using this method can be uploaded to the server\r\n![2](https://cloud.githubusercontent.com/assets/800604/15026146/db3124f0-1234-11e6-9219-5954adf1c8ff.png)\r\n","created_at":"2016-05-04T19:16:46Z","updated_at":"2016-05-04T22:50:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4ec9bc90ae34184baf44c79f49458e708e5dd725","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5218/commits","review_comments_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5218/comments","review_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5218/comments","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/c744aa7ebe49554f1e20f7bf1d8546885f382f68","head":{"label":"Automattic:add/image-editor","ref":"add/image-editor","sha":"c744aa7ebe49554f1e20f7bf1d8546885f382f68","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The new JavaScript- and API-powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2016-05-04T19:48:27Z","pushed_at":"2016-05-04T22:12:43Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":75391,"stargazers_count":7250,"watchers_count":7250,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":879,"mirror_url":null,"open_issues_count":1312,"forks":879,"open_issues":1312,"watchers":7250,"default_branch":"master"}},"base":{"label":"Automattic:master","ref":"master","sha":"a5450c8cc97fb9be4d82c822961f2d1e98bd5d70","user":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"repo":{"id":45936895,"name":"wp-calypso","full_name":"Automattic/wp-calypso","owner":{"login":"Automattic","id":887802,"avatar_url":"https://avatars.githubusercontent.com/u/887802?v=3","gravatar_id":"","url":"https://api.github.com/users/Automattic","html_url":"https://github.com/Automattic","followers_url":"https://api.github.com/users/Automattic/followers","following_url":"https://api.github.com/users/Automattic/following{/other_user}","gists_url":"https://api.github.com/users/Automattic/gists{/gist_id}","starred_url":"https://api.github.com/users/Automattic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Automattic/subscriptions","organizations_url":"https://api.github.com/users/Automattic/orgs","repos_url":"https://api.github.com/users/Automattic/repos","events_url":"https://api.github.com/users/Automattic/events{/privacy}","received_events_url":"https://api.github.com/users/Automattic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Automattic/wp-calypso","description":"The new JavaScript- and API-powered WordPress.com","fork":false,"url":"https://api.github.com/repos/Automattic/wp-calypso","forks_url":"https://api.github.com/repos/Automattic/wp-calypso/forks","keys_url":"https://api.github.com/repos/Automattic/wp-calypso/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Automattic/wp-calypso/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Automattic/wp-calypso/teams","hooks_url":"https://api.github.com/repos/Automattic/wp-calypso/hooks","issue_events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/events{/number}","events_url":"https://api.github.com/repos/Automattic/wp-calypso/events","assignees_url":"https://api.github.com/repos/Automattic/wp-calypso/assignees{/user}","branches_url":"https://api.github.com/repos/Automattic/wp-calypso/branches{/branch}","tags_url":"https://api.github.com/repos/Automattic/wp-calypso/tags","blobs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Automattic/wp-calypso/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Automattic/wp-calypso/git/refs{/sha}","trees_url":"https://api.github.com/repos/Automattic/wp-calypso/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Automattic/wp-calypso/statuses/{sha}","languages_url":"https://api.github.com/repos/Automattic/wp-calypso/languages","stargazers_url":"https://api.github.com/repos/Automattic/wp-calypso/stargazers","contributors_url":"https://api.github.com/repos/Automattic/wp-calypso/contributors","subscribers_url":"https://api.github.com/repos/Automattic/wp-calypso/subscribers","subscription_url":"https://api.github.com/repos/Automattic/wp-calypso/subscription","commits_url":"https://api.github.com/repos/Automattic/wp-calypso/commits{/sha}","git_commits_url":"https://api.github.com/repos/Automattic/wp-calypso/git/commits{/sha}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/comments{/number}","issue_comment_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments{/number}","contents_url":"https://api.github.com/repos/Automattic/wp-calypso/contents/{+path}","compare_url":"https://api.github.com/repos/Automattic/wp-calypso/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Automattic/wp-calypso/merges","archive_url":"https://api.github.com/repos/Automattic/wp-calypso/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Automattic/wp-calypso/downloads","issues_url":"https://api.github.com/repos/Automattic/wp-calypso/issues{/number}","pulls_url":"https://api.github.com/repos/Automattic/wp-calypso/pulls{/number}","milestones_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones{/number}","notifications_url":"https://api.github.com/repos/Automattic/wp-calypso/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/labels{/name}","releases_url":"https://api.github.com/repos/Automattic/wp-calypso/releases{/id}","deployments_url":"https://api.github.com/repos/Automattic/wp-calypso/deployments","created_at":"2015-11-10T20:00:16Z","updated_at":"2016-05-04T19:48:27Z","pushed_at":"2016-05-04T22:12:43Z","git_url":"git://github.com/Automattic/wp-calypso.git","ssh_url":"git@github.com:Automattic/wp-calypso.git","clone_url":"https://github.com/Automattic/wp-calypso.git","svn_url":"https://github.com/Automattic/wp-calypso","homepage":"https://developer.wordpress.com/calypso/","size":75391,"stargazers_count":7250,"watchers_count":7250,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":879,"mirror_url":null,"open_issues_count":1312,"forks":879,"open_issues":1312,"watchers":7250,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5218"},"html":{"href":"https://github.com/Automattic/wp-calypso/pull/5218"},"issue":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/5218"},"comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/issues/5218/comments"},"review_comments":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5218/comments"},"review_comment":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Automattic/wp-calypso/pulls/5218/commits"},"statuses":{"href":"https://api.github.com/repos/Automattic/wp-calypso/statuses/c744aa7ebe49554f1e20f7bf1d8546885f382f68"}}}}