{"action":"created","issue":{"url":"https://api.github.com/repos/Cadasta/cadasta-platform/issues/633","repository_url":"https://api.github.com/repos/Cadasta/cadasta-platform","labels_url":"https://api.github.com/repos/Cadasta/cadasta-platform/issues/633/labels{/name}","comments_url":"https://api.github.com/repos/Cadasta/cadasta-platform/issues/633/comments","events_url":"https://api.github.com/repos/Cadasta/cadasta-platform/issues/633/events","html_url":"https://github.com/Cadasta/cadasta-platform/pull/633","id":174741420,"number":633,"title":"Fix #590: spatial unit visibility","user":{"login":"ian-ross","id":1113720,"avatar_url":"https://avatars.githubusercontent.com/u/1113720?v=3","gravatar_id":"","url":"https://api.github.com/users/ian-ross","html_url":"https://github.com/ian-ross","followers_url":"https://api.github.com/users/ian-ross/followers","following_url":"https://api.github.com/users/ian-ross/following{/other_user}","gists_url":"https://api.github.com/users/ian-ross/gists{/gist_id}","starred_url":"https://api.github.com/users/ian-ross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ian-ross/subscriptions","organizations_url":"https://api.github.com/users/ian-ross/orgs","repos_url":"https://api.github.com/users/ian-ross/repos","events_url":"https://api.github.com/users/ian-ross/events{/privacy}","received_events_url":"https://api.github.com/users/ian-ross/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Cadasta/cadasta-platform/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"linzjax","id":8128188,"avatar_url":"https://avatars.githubusercontent.com/u/8128188?v=3","gravatar_id":"","url":"https://api.github.com/users/linzjax","html_url":"https://github.com/linzjax","followers_url":"https://api.github.com/users/linzjax/followers","following_url":"https://api.github.com/users/linzjax/following{/other_user}","gists_url":"https://api.github.com/users/linzjax/gists{/gist_id}","starred_url":"https://api.github.com/users/linzjax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linzjax/subscriptions","organizations_url":"https://api.github.com/users/linzjax/orgs","repos_url":"https://api.github.com/users/linzjax/repos","events_url":"https://api.github.com/users/linzjax/events{/privacy}","received_events_url":"https://api.github.com/users/linzjax/received_events","type":"User","site_admin":false},"assignees":[{"login":"linzjax","id":8128188,"avatar_url":"https://avatars.githubusercontent.com/u/8128188?v=3","gravatar_id":"","url":"https://api.github.com/users/linzjax","html_url":"https://github.com/linzjax","followers_url":"https://api.github.com/users/linzjax/followers","following_url":"https://api.github.com/users/linzjax/following{/other_user}","gists_url":"https://api.github.com/users/linzjax/gists{/gist_id}","starred_url":"https://api.github.com/users/linzjax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linzjax/subscriptions","organizations_url":"https://api.github.com/users/linzjax/orgs","repos_url":"https://api.github.com/users/linzjax/repos","events_url":"https://api.github.com/users/linzjax/events{/privacy}","received_events_url":"https://api.github.com/users/linzjax/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2016-09-02T11:46:16Z","updated_at":"2016-09-02T16:17:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Cadasta/cadasta-platform/pulls/633","html_url":"https://github.com/Cadasta/cadasta-platform/pull/633","diff_url":"https://github.com/Cadasta/cadasta-platform/pull/633.diff","patch_url":"https://github.com/Cadasta/cadasta-platform/pull/633.patch"},"body":"### Proposed changes in this pull request\r\n\r\n- Fix #590.\r\n- Add the `spatial.list` permission for all public projects to the `default.json` policy file.\r\n- Add the capabilty to force reloading of tutelary policies from JSON documents to the `loadstatic` command.  Running `./manage.py loadstatic --update-policies` will update the policies stored in the database from the JSON policy files.  (A server restart is needed after this to pick up the new policies from the database.)\r\n- Update spatial unit list API to use correct permissions: the user must have the `spatial.list` permission on the project and must be able to view the project (so must have the `project.view` or `project.view_private` permission, depending on whether the project is public or private).\r\n- Update tests to take account of the fact that anonymous users can now list spatial units.\r\n\r\n### When should this PR be merged\r\n\r\nAny time.\r\n\r\n### Risks\r\n\r\nNone.\r\n\r\n### Follow up actions\r\n\r\n1. Run the management command `./manage.py loadstatic --update-policies` to load the new policy files into the database.\r\n2. Restart the Django server to pick up the new policies from the database.\r\n"},"comment":{"url":"https://api.github.com/repos/Cadasta/cadasta-platform/issues/comments/244420454","html_url":"https://github.com/Cadasta/cadasta-platform/pull/633#issuecomment-244420454","issue_url":"https://api.github.com/repos/Cadasta/cadasta-platform/issues/633","id":244420454,"user":{"login":"linzjax","id":8128188,"avatar_url":"https://avatars.githubusercontent.com/u/8128188?v=3","gravatar_id":"","url":"https://api.github.com/users/linzjax","html_url":"https://github.com/linzjax","followers_url":"https://api.github.com/users/linzjax/followers","following_url":"https://api.github.com/users/linzjax/following{/other_user}","gists_url":"https://api.github.com/users/linzjax/gists{/gist_id}","starred_url":"https://api.github.com/users/linzjax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linzjax/subscriptions","organizations_url":"https://api.github.com/users/linzjax/orgs","repos_url":"https://api.github.com/users/linzjax/repos","events_url":"https://api.github.com/users/linzjax/events{/privacy}","received_events_url":"https://api.github.com/users/linzjax/received_events","type":"User","site_admin":false},"created_at":"2016-09-02T16:17:03Z","updated_at":"2016-09-02T16:17:03Z","body":"Turns out that was a left over issue on my machine, so this is good to go once tests pass."}}
{"actor":{"display_login":"linzjax"}}