{"action":"created","issue":{"url":"https://api.github.com/repos/Chorus/chorus/issues/268","repository_url":"https://api.github.com/repos/Chorus/chorus","labels_url":"https://api.github.com/repos/Chorus/chorus/issues/268/labels{/name}","comments_url":"https://api.github.com/repos/Chorus/chorus/issues/268/comments","events_url":"https://api.github.com/repos/Chorus/chorus/issues/268/events","html_url":"https://github.com/Chorus/chorus/pull/268","id":139738416,"number":268,"title":"RGP refactor","user":{"login":"AndrewLngdn","id":1474568,"avatar_url":"https://avatars.githubusercontent.com/u/1474568?v=3","gravatar_id":"","url":"https://api.github.com/users/AndrewLngdn","html_url":"https://github.com/AndrewLngdn","followers_url":"https://api.github.com/users/AndrewLngdn/followers","following_url":"https://api.github.com/users/AndrewLngdn/following{/other_user}","gists_url":"https://api.github.com/users/AndrewLngdn/gists{/gist_id}","starred_url":"https://api.github.com/users/AndrewLngdn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AndrewLngdn/subscriptions","organizations_url":"https://api.github.com/users/AndrewLngdn/orgs","repos_url":"https://api.github.com/users/AndrewLngdn/repos","events_url":"https://api.github.com/users/AndrewLngdn/events{/privacy}","received_events_url":"https://api.github.com/users/AndrewLngdn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"kevinmtrowbridge","id":486640,"avatar_url":"https://avatars.githubusercontent.com/u/486640?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinmtrowbridge","html_url":"https://github.com/kevinmtrowbridge","followers_url":"https://api.github.com/users/kevinmtrowbridge/followers","following_url":"https://api.github.com/users/kevinmtrowbridge/following{/other_user}","gists_url":"https://api.github.com/users/kevinmtrowbridge/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinmtrowbridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinmtrowbridge/subscriptions","organizations_url":"https://api.github.com/users/kevinmtrowbridge/orgs","repos_url":"https://api.github.com/users/kevinmtrowbridge/repos","events_url":"https://api.github.com/users/kevinmtrowbridge/events{/privacy}","received_events_url":"https://api.github.com/users/kevinmtrowbridge/received_events","type":"User","site_admin":false},"milestone":null,"comments":3,"created_at":"2016-03-09T23:57:07Z","updated_at":"2016-03-15T22:54:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Chorus/chorus/pulls/268","html_url":"https://github.com/Chorus/chorus/pull/268","diff_url":"https://github.com/Chorus/chorus/pull/268.diff","patch_url":"https://github.com/Chorus/chorus/pull/268.patch"},"body":"Move permissions check from controller decorators to the new 'permissions' folder. This helps reduce a ton of duplicated code (ex: check user_is_member? of a workspace in the WorkspacePermissions class instead of in each controller decorator that authorizes a workspace object). \r\n\r\nThis cut out 50 or so controller decorators, and simplifies our auth code path. Permissions are now closer to the model being inspected and not scattered over the controllers (ex: workspace auth was happening the same way in 20 different controllers). \r\n\r\n@kevinmtrowbridge let me know if you think any changes should be made\r\n"},"comment":{"url":"https://api.github.com/repos/Chorus/chorus/issues/comments/197058965","html_url":"https://github.com/Chorus/chorus/pull/268#issuecomment-197058965","issue_url":"https://api.github.com/repos/Chorus/chorus/issues/268","id":197058965,"user":{"login":"kevinmtrowbridge","id":486640,"avatar_url":"https://avatars.githubusercontent.com/u/486640?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinmtrowbridge","html_url":"https://github.com/kevinmtrowbridge","followers_url":"https://api.github.com/users/kevinmtrowbridge/followers","following_url":"https://api.github.com/users/kevinmtrowbridge/following{/other_user}","gists_url":"https://api.github.com/users/kevinmtrowbridge/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinmtrowbridge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinmtrowbridge/subscriptions","organizations_url":"https://api.github.com/users/kevinmtrowbridge/orgs","repos_url":"https://api.github.com/users/kevinmtrowbridge/repos","events_url":"https://api.github.com/users/kevinmtrowbridge/events{/privacy}","received_events_url":"https://api.github.com/users/kevinmtrowbridge/received_events","type":"User","site_admin":false},"created_at":"2016-03-15T22:54:32Z","updated_at":"2016-03-15T22:54:32Z","body":"Ok @AndrewLngdn -- I created another PR for the very spammy 'delete old authorization' component work: https://github.com/Chorus/chorus/pull/269, please review that one first and merge it into this one, once its Travis tests pass.\r\n\r\nBesides for the comments I made above, I think this is ready to be merged in.  If you want to respond to any of those comments, please do.  So:\r\n\r\n1) Review and merge #269 \r\n2) Review my further changes in this branch and respond to comments\r\n3) Merge this stuff into master!  :)\r\n\r\nThanks for your work I feel quite good about the state of the Authorization component now and, even the idea of componentization: \r\n* it's so cool that there's only ~340 rspec tests in this component and its tests run in about 2 minutes\r\n* we can upgrade it to Rspec 3 at any time and use any testing libraries we want\r\n\r\nKT"}}