{"action":"created","issue":{"url":"https://api.github.com/repos/scitran/core/issues/662","repository_url":"https://api.github.com/repos/scitran/core","labels_url":"https://api.github.com/repos/scitran/core/issues/662/labels{/name}","comments_url":"https://api.github.com/repos/scitran/core/issues/662/comments","events_url":"https://api.github.com/repos/scitran/core/issues/662/events","html_url":"https://github.com/scitran/core/issues/662","id":207283119,"number":662,"title":"Rename `group.roles` --> `group.permissions`","user":{"login":"kofalt","id":265071,"avatar_url":"https://avatars3.githubusercontent.com/u/265071?v=3","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},"labels":[{"id":538859455,"url":"https://api.github.com/repos/scitran/core/labels/SDK","name":"SDK","color":"006b75","default":false},{"id":336350456,"url":"https://api.github.com/repos/scitran/core/labels/Tech%20Debt","name":"Tech Debt","color":"bfe5bf","default":false}],"state":"open","locked":false,"assignee":{"login":"kofalt","id":265071,"avatar_url":"https://avatars3.githubusercontent.com/u/265071?v=3","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},"assignees":[{"login":"kofalt","id":265071,"avatar_url":"https://avatars3.githubusercontent.com/u/265071?v=3","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,"avatar_url":"https://avatars1.githubusercontent.com/u/5702596?v=3","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}],"milestone":null,"comments":0,"created_at":"2017-02-13T17:19:51Z","updated_at":"2017-05-24T19:07:22Z","closed_at":null,"body":"1. Inconsistency (this is aliased away in the SDK)\r\n1. Despite the name, roles are actually permissions in that they control R/W access to that group"},"comment":{"url":"https://api.github.com/repos/scitran/core/issues/comments/303821753","html_url":"https://github.com/scitran/core/issues/662#issuecomment-303821753","issue_url":"https://api.github.com/repos/scitran/core/issues/662","id":303821753,"user":{"login":"nagem","id":5702596,"avatar_url":"https://avatars1.githubusercontent.com/u/5702596?v=3","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},"created_at":"2017-05-24T19:07:22Z","updated_at":"2017-05-24T19:07:22Z","body":"Some general history/context around the separate naming:\r\n\r\nGroups \"roles\" were considered permissions templates for when a user of a group creates a new project in that group. A user having rw or ro permissions on a group doesn't really give the user any new abilities involving that group, so groups were givens \"roles\" to imply the user's role didn't always grant them much for permissions. \r\n\r\nOver the course of time, this minor difference in key names has caused a lot of headaches for development. You will see many instances of:\r\n```\r\nperms = container.get('permissions', [])\r\nif not perms:\r\n    perms = container.get('roles', [])\r\n....\r\n```\r\n\r\nRenaming the group key `roles` -> `permissions` will allow us to get rid of a lot of this logic. \r\n\r\nTo Do:\r\n  - Have a db upgrade script that renames the key on the groups collection\r\n  - Scour the codebase looking for \"roles\", removing references to `roles` and using only the `permissions` key instead\r\n  - Update any tests affected by these changes\r\n"}}
{"actor":{"display_login":"nagem"}}