{"action":"created","issue":{"url":"https://api.github.com/repos/CartoDB/cartodb/issues/10101","repository_url":"https://api.github.com/repos/CartoDB/cartodb","labels_url":"https://api.github.com/repos/CartoDB/cartodb/issues/10101/labels{/name}","comments_url":"https://api.github.com/repos/CartoDB/cartodb/issues/10101/comments","events_url":"https://api.github.com/repos/CartoDB/cartodb/issues/10101/events","html_url":"https://github.com/CartoDB/cartodb/pull/10101","id":181914603,"number":10101,"title":"9482 private datasets warning","user":{"login":"hacheka","id":1078228,"avatar_url":"https://avatars.githubusercontent.com/u/1078228?v=3","gravatar_id":"","url":"https://api.github.com/users/hacheka","html_url":"https://github.com/hacheka","followers_url":"https://api.github.com/users/hacheka/followers","following_url":"https://api.github.com/users/hacheka/following{/other_user}","gists_url":"https://api.github.com/users/hacheka/gists{/gist_id}","starred_url":"https://api.github.com/users/hacheka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hacheka/subscriptions","organizations_url":"https://api.github.com/users/hacheka/orgs","repos_url":"https://api.github.com/users/hacheka/repos","events_url":"https://api.github.com/users/hacheka/events{/privacy}","received_events_url":"https://api.github.com/users/hacheka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-10-09T21:56:55Z","updated_at":"2016-10-10T08:11:24Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/CartoDB/cartodb/pulls/10101","html_url":"https://github.com/CartoDB/cartodb/pull/10101","diff_url":"https://github.com/CartoDB/cartodb/pull/10101.diff","patch_url":"https://github.com/CartoDB/cartodb/pull/10101.patch"},"body":"This pull request has been created as a result of a challenge sent by @javisantana and @xavijam \r\nIt resolves CartoDB/cartodb#9482 \r\n\r\nThere are changes in two places:\r\n- In private builder, when exporting a map with private datasets, a warning shows up.\r\n- In a map public page, when exporting the map it shows different warning depending on the private datasets ownership: it they are yours, it warns you that the private datasets will be exported. If you don't own them, the dialog warns you that not all the data will be exported.\r\n\r\nYou can find the GIFs of the different scenarios below.\r\n\r\nSome notes about this pull request:\r\n- There are tests for the new view logic. Anyway, no tests have been created related to code where no previous tests exist. This code only makes minor changes in existing logic, so no new specs have been created because it'd been implied to write tests for logic not related to the issue.\r\n- An iteration of this PR could be to apply these changes to organizations, where users can have access to datasets not owned by them.\r\n\r\n## Changes explained\r\n\r\nThere have been changes in private builder page and map public page.\r\n\r\n\r\n### Private builder\r\n\r\n\r\nNew render option passed to modal-export-map-view indicating if the map contains private datasets.\r\n\r\n**Map with public datasets**\r\n\r\n![public dataset](https://cloud.githubusercontent.com/assets/1078228/19223881/994a21fa-8e7a-11e6-9ef0-2407f463b182.gif)\r\n\r\n\r\n\r\n**Map with private datasets**\r\n\r\n![private dataset](https://cloud.githubusercontent.com/assets/1078228/19223893/a97246b6-8e7a-11e6-97d0-6f057575b2f6.gif)\r\n\r\n\r\n\r\n \r\n### Map public page\r\n\r\nTwo data attributes rendered at the export map link: `data-private-datasets` and `data-owning-private-datasets` These attributes are filled at controller level and retrieved in the link event handling function. Passed to the modal view constructor.\r\n\r\n**Map with public datasets**\r\n\r\n![public export](https://cloud.githubusercontent.com/assets/1078228/19223910/bc5ba86c-8e7a-11e6-8c5d-49643f4ef5e4.gif)\r\n\r\n\r\n\r\n**Map with private datasets owned by the current user**\r\n\r\n![owning private](https://cloud.githubusercontent.com/assets/1078228/19223912/cffbe35a-8e7a-11e6-892a-1f1df61eb704.gif)\r\n\r\n\r\n\r\n**Map with private datasets owned by another user**\r\n\r\n![not owning private](https://cloud.githubusercontent.com/assets/1078228/19223914/e1069596-8e7a-11e6-9077-a153047ec920.gif)\r\n\r\n\r\nI guess that @xavijam is the one to review this PR. Be nice! ;)\r\n\r\nRegards,\r\nIvan\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/CartoDB/cartodb/issues/comments/252557220","html_url":"https://github.com/CartoDB/cartodb/pull/10101#issuecomment-252557220","issue_url":"https://api.github.com/repos/CartoDB/cartodb/issues/10101","id":252557220,"user":{"login":"Cartofante","id":5066482,"avatar_url":"https://avatars.githubusercontent.com/u/5066482?v=3","gravatar_id":"","url":"https://api.github.com/users/Cartofante","html_url":"https://github.com/Cartofante","followers_url":"https://api.github.com/users/Cartofante/followers","following_url":"https://api.github.com/users/Cartofante/following{/other_user}","gists_url":"https://api.github.com/users/Cartofante/gists{/gist_id}","starred_url":"https://api.github.com/users/Cartofante/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cartofante/subscriptions","organizations_url":"https://api.github.com/users/Cartofante/orgs","repos_url":"https://api.github.com/users/Cartofante/repos","events_url":"https://api.github.com/users/Cartofante/events{/privacy}","received_events_url":"https://api.github.com/users/Cartofante/received_events","type":"User","site_admin":false},"created_at":"2016-10-10T08:11:24Z","updated_at":"2016-10-10T08:11:24Z","body":"Can one of the admins verify this patch?"}}
{"actor":{"display_login":"Cartofante"}}