{"action":"created","comment":{"url":"https://api.github.com/repos/aptible/dashboard.aptible.com/pulls/comments/73726689","id":73726689,"diff_hunk":"@@ -20,8 +20,29 @@ export default Ember.Route.extend({\n     controller.set('currentUserRoles', model.currentUserRoles);\n   },\n \n+  redirect(model) {\n+    let org = model.role.get('organization');\n+    let currentUser = this.session.get('currentUser');\n+    let currentUserMembership = model.memberships.filterBy('user.id', currentUser.get('id'))[0];\n+\n+    if ((model.role.get('isPlatform') && currentUser.canManagePlatform(model.currentUserRoles, org)) ||\n+        (model.role.get('isCompliance') && currentUser.canManageCompliance(model.currentUserRoles, org)) ||\n+        (currentUserMembership && currentUserMembership.get('privileged'))) {","path":"app/role/members/route.js","position":11,"original_position":11,"commit_id":"0d35816d4debda6709a6706f0dc5072926949a08","original_commit_id":"99809724387d9e06af4be2d080f1cf717d727218","user":{"login":"gib","id":94830,"avatar_url":"https://avatars.githubusercontent.com/u/94830?v=3","gravatar_id":"","url":"https://api.github.com/users/gib","html_url":"https://github.com/gib","followers_url":"https://api.github.com/users/gib/followers","following_url":"https://api.github.com/users/gib/following{/other_user}","gists_url":"https://api.github.com/users/gib/gists{/gist_id}","starred_url":"https://api.github.com/users/gib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gib/subscriptions","organizations_url":"https://api.github.com/users/gib/orgs","repos_url":"https://api.github.com/users/gib/repos","events_url":"https://api.github.com/users/gib/events{/privacy}","received_events_url":"https://api.github.com/users/gib/received_events","type":"User","site_admin":false},"body":"Discussed with @sandersonet. Going to tackle this more generally, see https://github.com/aptible/dashboard.aptible.com/issues/680","created_at":"2016-08-05T17:11:16Z","updated_at":"2016-08-05T17:11:16Z","html_url":"https://github.com/aptible/dashboard.aptible.com/pull/679#discussion_r73726689","pull_request_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/pulls/679","_links":{"self":{"href":"https://api.github.com/repos/aptible/dashboard.aptible.com/pulls/comments/73726689"},"html":{"href":"https://github.com/aptible/dashboard.aptible.com/pull/679#discussion_r73726689"},"pull_request":{"href":"https://api.github.com/repos/aptible/dashboard.aptible.com/pulls/679"}}},"pull_request":{"url":"https://api.github.com/repos/aptible/dashboard.aptible.com/pulls/679","id":79781766,"html_url":"https://github.com/aptible/dashboard.aptible.com/pull/679","diff_url":"https://github.com/aptible/dashboard.aptible.com/pull/679.diff","patch_url":"https://github.com/aptible/dashboard.aptible.com/pull/679.patch","issue_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/issues/679","number":679,"state":"open","locked":false,"title":"Membership Removal Updates","user":{"login":"gib","id":94830,"avatar_url":"https://avatars.githubusercontent.com/u/94830?v=3","gravatar_id":"","url":"https://api.github.com/users/gib","html_url":"https://github.com/gib","followers_url":"https://api.github.com/users/gib/followers","following_url":"https://api.github.com/users/gib/following{/other_user}","gists_url":"https://api.github.com/users/gib/gists{/gist_id}","starred_url":"https://api.github.com/users/gib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gib/subscriptions","organizations_url":"https://api.github.com/users/gib/orgs","repos_url":"https://api.github.com/users/gib/repos","events_url":"https://api.github.com/users/gib/events{/privacy}","received_events_url":"https://api.github.com/users/gib/received_events","type":"User","site_admin":false},"body":"- should no longer be able to remove a user’s last role from the role members screen\r\n- relies on the member edit to enforce protecting removal of the billing contact and security officer (logic already existed there)\r\n- Always show actions in tables\r\n- redirect unauthorized users from an individual role view back to the role list (or lists) they do have access to\r\n![account-owner-remove](https://cloud.githubusercontent.com/assets/94830/17339648/0cb69094-58aa-11e6-9ce2-82d41e157056.gif)\r\n","created_at":"2016-08-02T18:10:14Z","updated_at":"2016-08-05T17:11:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2ffbfd994ec615a52f3e17dea2ab9bbc8b1223e2","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/pulls/679/commits","review_comments_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/pulls/679/comments","review_comment_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/issues/679/comments","statuses_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/statuses/0d35816d4debda6709a6706f0dc5072926949a08","head":{"label":"gib:membership-removal-checks","ref":"membership-removal-checks","sha":"0d35816d4debda6709a6706f0dc5072926949a08","user":{"login":"gib","id":94830,"avatar_url":"https://avatars.githubusercontent.com/u/94830?v=3","gravatar_id":"","url":"https://api.github.com/users/gib","html_url":"https://github.com/gib","followers_url":"https://api.github.com/users/gib/followers","following_url":"https://api.github.com/users/gib/following{/other_user}","gists_url":"https://api.github.com/users/gib/gists{/gist_id}","starred_url":"https://api.github.com/users/gib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gib/subscriptions","organizations_url":"https://api.github.com/users/gib/orgs","repos_url":"https://api.github.com/users/gib/repos","events_url":"https://api.github.com/users/gib/events{/privacy}","received_events_url":"https://api.github.com/users/gib/received_events","type":"User","site_admin":false},"repo":{"id":38650411,"name":"dashboard.aptible.com","full_name":"gib/dashboard.aptible.com","owner":{"login":"gib","id":94830,"avatar_url":"https://avatars.githubusercontent.com/u/94830?v=3","gravatar_id":"","url":"https://api.github.com/users/gib","html_url":"https://github.com/gib","followers_url":"https://api.github.com/users/gib/followers","following_url":"https://api.github.com/users/gib/following{/other_user}","gists_url":"https://api.github.com/users/gib/gists{/gist_id}","starred_url":"https://api.github.com/users/gib/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gib/subscriptions","organizations_url":"https://api.github.com/users/gib/orgs","repos_url":"https://api.github.com/users/gib/repos","events_url":"https://api.github.com/users/gib/events{/privacy}","received_events_url":"https://api.github.com/users/gib/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gib/dashboard.aptible.com","description":"Ember dashboard for the Aptible PaaS","fork":true,"url":"https://api.github.com/repos/gib/dashboard.aptible.com","forks_url":"https://api.github.com/repos/gib/dashboard.aptible.com/forks","keys_url":"https://api.github.com/repos/gib/dashboard.aptible.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gib/dashboard.aptible.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gib/dashboard.aptible.com/teams","hooks_url":"https://api.github.com/repos/gib/dashboard.aptible.com/hooks","issue_events_url":"https://api.github.com/repos/gib/dashboard.aptible.com/issues/events{/number}","events_url":"https://api.github.com/repos/gib/dashboard.aptible.com/events","assignees_url":"https://api.github.com/repos/gib/dashboard.aptible.com/assignees{/user}","branches_url":"https://api.github.com/repos/gib/dashboard.aptible.com/branches{/branch}","tags_url":"https://api.github.com/repos/gib/dashboard.aptible.com/tags","blobs_url":"https://api.github.com/repos/gib/dashboard.aptible.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gib/dashboard.aptible.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gib/dashboard.aptible.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/gib/dashboard.aptible.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gib/dashboard.aptible.com/statuses/{sha}","languages_url":"https://api.github.com/repos/gib/dashboard.aptible.com/languages","stargazers_url":"https://api.github.com/repos/gib/dashboard.aptible.com/stargazers","contributors_url":"https://api.github.com/repos/gib/dashboard.aptible.com/contributors","subscribers_url":"https://api.github.com/repos/gib/dashboard.aptible.com/subscribers","subscription_url":"https://api.github.com/repos/gib/dashboard.aptible.com/subscription","commits_url":"https://api.github.com/repos/gib/dashboard.aptible.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/gib/dashboard.aptible.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/gib/dashboard.aptible.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/gib/dashboard.aptible.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/gib/dashboard.aptible.com/contents/{+path}","compare_url":"https://api.github.com/repos/gib/dashboard.aptible.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gib/dashboard.aptible.com/merges","archive_url":"https://api.github.com/repos/gib/dashboard.aptible.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gib/dashboard.aptible.com/downloads","issues_url":"https://api.github.com/repos/gib/dashboard.aptible.com/issues{/number}","pulls_url":"https://api.github.com/repos/gib/dashboard.aptible.com/pulls{/number}","milestones_url":"https://api.github.com/repos/gib/dashboard.aptible.com/milestones{/number}","notifications_url":"https://api.github.com/repos/gib/dashboard.aptible.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gib/dashboard.aptible.com/labels{/name}","releases_url":"https://api.github.com/repos/gib/dashboard.aptible.com/releases{/id}","deployments_url":"https://api.github.com/repos/gib/dashboard.aptible.com/deployments","created_at":"2015-07-06T22:43:32Z","updated_at":"2016-05-05T20:12:26Z","pushed_at":"2016-08-05T16:59:33Z","git_url":"git://github.com/gib/dashboard.aptible.com.git","ssh_url":"git@github.com:gib/dashboard.aptible.com.git","clone_url":"https://github.com/gib/dashboard.aptible.com.git","svn_url":"https://github.com/gib/dashboard.aptible.com","homepage":"https://dashboard.aptible.com","size":2912,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"aptible:master","ref":"master","sha":"c8dda8b1d48ab5fff95230642c22e3d17bda0d5d","user":{"login":"aptible","id":4594193,"avatar_url":"https://avatars.githubusercontent.com/u/4594193?v=3","gravatar_id":"","url":"https://api.github.com/users/aptible","html_url":"https://github.com/aptible","followers_url":"https://api.github.com/users/aptible/followers","following_url":"https://api.github.com/users/aptible/following{/other_user}","gists_url":"https://api.github.com/users/aptible/gists{/gist_id}","starred_url":"https://api.github.com/users/aptible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aptible/subscriptions","organizations_url":"https://api.github.com/users/aptible/orgs","repos_url":"https://api.github.com/users/aptible/repos","events_url":"https://api.github.com/users/aptible/events{/privacy}","received_events_url":"https://api.github.com/users/aptible/received_events","type":"Organization","site_admin":false},"repo":{"id":26767408,"name":"dashboard.aptible.com","full_name":"aptible/dashboard.aptible.com","owner":{"login":"aptible","id":4594193,"avatar_url":"https://avatars.githubusercontent.com/u/4594193?v=3","gravatar_id":"","url":"https://api.github.com/users/aptible","html_url":"https://github.com/aptible","followers_url":"https://api.github.com/users/aptible/followers","following_url":"https://api.github.com/users/aptible/following{/other_user}","gists_url":"https://api.github.com/users/aptible/gists{/gist_id}","starred_url":"https://api.github.com/users/aptible/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aptible/subscriptions","organizations_url":"https://api.github.com/users/aptible/orgs","repos_url":"https://api.github.com/users/aptible/repos","events_url":"https://api.github.com/users/aptible/events{/privacy}","received_events_url":"https://api.github.com/users/aptible/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/aptible/dashboard.aptible.com","description":"Ember.js dashboard for the Aptible PaaS","fork":false,"url":"https://api.github.com/repos/aptible/dashboard.aptible.com","forks_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/forks","keys_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/teams","hooks_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/hooks","issue_events_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/issues/events{/number}","events_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/events","assignees_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/assignees{/user}","branches_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/branches{/branch}","tags_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/tags","blobs_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/statuses/{sha}","languages_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/languages","stargazers_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/stargazers","contributors_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/contributors","subscribers_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/subscribers","subscription_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/subscription","commits_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/contents/{+path}","compare_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/merges","archive_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/downloads","issues_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/issues{/number}","pulls_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/pulls{/number}","milestones_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/milestones{/number}","notifications_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/labels{/name}","releases_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/releases{/id}","deployments_url":"https://api.github.com/repos/aptible/dashboard.aptible.com/deployments","created_at":"2014-11-17T17:06:45Z","updated_at":"2016-07-01T18:31:43Z","pushed_at":"2016-08-05T16:59:33Z","git_url":"git://github.com/aptible/dashboard.aptible.com.git","ssh_url":"git@github.com:aptible/dashboard.aptible.com.git","clone_url":"https://github.com/aptible/dashboard.aptible.com.git","svn_url":"https://github.com/aptible/dashboard.aptible.com","homepage":"https://dashboard.aptible.com","size":3070,"stargazers_count":80,"watchers_count":80,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":77,"forks":34,"open_issues":77,"watchers":80,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/aptible/dashboard.aptible.com/pulls/679"},"html":{"href":"https://github.com/aptible/dashboard.aptible.com/pull/679"},"issue":{"href":"https://api.github.com/repos/aptible/dashboard.aptible.com/issues/679"},"comments":{"href":"https://api.github.com/repos/aptible/dashboard.aptible.com/issues/679/comments"},"review_comments":{"href":"https://api.github.com/repos/aptible/dashboard.aptible.com/pulls/679/comments"},"review_comment":{"href":"https://api.github.com/repos/aptible/dashboard.aptible.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/aptible/dashboard.aptible.com/pulls/679/commits"},"statuses":{"href":"https://api.github.com/repos/aptible/dashboard.aptible.com/statuses/0d35816d4debda6709a6706f0dc5072926949a08"}}}}
{"actor":{"display_login":"gib"}}