{"action":"created","issue":{"url":"https://api.github.com/repos/poldracklab/bids-core/issues/5","repository_url":"https://api.github.com/repos/poldracklab/bids-core","labels_url":"https://api.github.com/repos/poldracklab/bids-core/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/poldracklab/bids-core/issues/5/comments","events_url":"https://api.github.com/repos/poldracklab/bids-core/issues/5/events","html_url":"https://github.com/poldracklab/bids-core/issues/5","id":139703783,"number":5,"title":"Add support for modifying snapshot permissions. ","user":{"login":"constellates","id":4325905,"avatar_url":"https://avatars.githubusercontent.com/u/4325905?v=3","gravatar_id":"","url":"https://api.github.com/users/constellates","html_url":"https://github.com/constellates","followers_url":"https://api.github.com/users/constellates/followers","following_url":"https://api.github.com/users/constellates/following{/other_user}","gists_url":"https://api.github.com/users/constellates/gists{/gist_id}","starred_url":"https://api.github.com/users/constellates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/constellates/subscriptions","organizations_url":"https://api.github.com/users/constellates/orgs","repos_url":"https://api.github.com/users/constellates/repos","events_url":"https://api.github.com/users/constellates/events{/privacy}","received_events_url":"https://api.github.com/users/constellates/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/poldracklab/bids-core/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/poldracklab/bids-core/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-03-09T21:20:41Z","updated_at":"2016-03-11T18:21:21Z","closed_at":null,"body":"### Use case: \r\nParent projects should determine the permissions of their snapshots. If a project is shared with a user, that user can see all of that project's snapshots not only the ones snapshotted since they joined the project. And similarly if a user is removed from a project they should no longer be able to view the private snapshots taken while they were a member of the project. \r\n\r\n### Current Issue:\r\nPermissions are currently checked against the permissions object on the snapshot which is copied from the parent project at the time of snapshotting. Permissions on snapshots are currently immutable.\r\n\r\n### Caveats: \r\nWe can't directly rely on the permissions object on the parent project because it's possible that a project will deleted and its snapshots will remain active. In which case there would be no permissions to check.\r\n\r\n### Solutions: \r\n\r\n1. Make permissions modifications requests on projects mirror those permissions across all snapshots.\r\n  * Pros: Simple API for maintaining permissions.\r\n  * Cons: Permissions can't be managed on snapshots after parent project is deleted.\r\n2. Allow permissions to be modified on individual snapshots.\r\n  * Pros: Probably most flexible solution. Allows permissions to continue being modified after parent is removed.\r\n  * Cons: Adds a bunch of requests that need to be made when permissions change. Possibility of weird situations where snapshots within the same project have different permissions.\r\n3. Setup private snapshots to defer to parent project permissions and remove all private snapshots when a parent project is removed.\r\n  * Pros: No changes to the permissions modification API. Doesn't affect published snapshots.\r\n  * Cons: We have to remove private snapshots that could contain valuable project transformations and analysis.\r\n\r\n### Questions:\r\n\r\nI think the biggest unknown from a user perspective is what do we do with private snapshots of a parent project that has been deleted. Can they also be deleted? Is there an important use case with orphaned private snapshots?"},"comment":{"url":"https://api.github.com/repos/poldracklab/bids-core/issues/comments/195487170","html_url":"https://github.com/poldracklab/bids-core/issues/5#issuecomment-195487170","issue_url":"https://api.github.com/repos/poldracklab/bids-core/issues/5","id":195487170,"user":{"login":"constellates","id":4325905,"avatar_url":"https://avatars.githubusercontent.com/u/4325905?v=3","gravatar_id":"","url":"https://api.github.com/users/constellates","html_url":"https://github.com/constellates","followers_url":"https://api.github.com/users/constellates/followers","following_url":"https://api.github.com/users/constellates/following{/other_user}","gists_url":"https://api.github.com/users/constellates/gists{/gist_id}","starred_url":"https://api.github.com/users/constellates/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/constellates/subscriptions","organizations_url":"https://api.github.com/users/constellates/orgs","repos_url":"https://api.github.com/users/constellates/repos","events_url":"https://api.github.com/users/constellates/events{/privacy}","received_events_url":"https://api.github.com/users/constellates/received_events","type":"User","site_admin":false},"created_at":"2016-03-11T18:21:21Z","updated_at":"2016-03-11T18:21:21Z","body":"Can we just allow superuser's (those with root=true) for that? Through the UI superusers are the only ones we currently allow to modify or delete public snapshots."}}