{"action":"created","comment":{"url":"https://api.github.com/repos/3scale/porta/pulls/comments/222382359","pull_request_review_id":161255887,"id":222382359,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMjM4MjM1OQ==","diff_hunk":"@@ -43,7 +44,7 @@ nav.DashboardNavigation\n                                                  admin_service_end_user_plans_path(service)\n \n     // Integration\n-    - if can?(:edit, service) && !service.has_traffic?\n+    - if can?(:manage, :plans) && !service.has_traffic?","path":"app/views/provider/admin/dashboards/_service_navigation.html.slim","position":33,"original_position":33,"commit_id":"8a84891d4053c5a19920b216572898b90a0f5ced","original_commit_id":"8a84891d4053c5a19920b216572898b90a0f5ced","user":{"login":"Martouta","id":11318903,"node_id":"MDQ6VXNlcjExMzE4OTAz","avatar_url":"https://avatars1.githubusercontent.com/u/11318903?v=4","gravatar_id":"","url":"https://api.github.com/users/Martouta","html_url":"https://github.com/Martouta","followers_url":"https://api.github.com/users/Martouta/followers","following_url":"https://api.github.com/users/Martouta/following{/other_user}","gists_url":"https://api.github.com/users/Martouta/gists{/gist_id}","starred_url":"https://api.github.com/users/Martouta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Martouta/subscriptions","organizations_url":"https://api.github.com/users/Martouta/orgs","repos_url":"https://api.github.com/users/Martouta/repos","events_url":"https://api.github.com/users/Martouta/events{/privacy}","received_events_url":"https://api.github.com/users/Martouta/received_events","type":"User","site_admin":false},"body":"Are you sure? It sounds more related to editing the service than managing plans 🤔 But if you are sure, I believe you","created_at":"2018-10-03T16:39:23Z","updated_at":"2018-10-03T16:39:24Z","html_url":"https://github.com/3scale/porta/pull/87#discussion_r222382359","pull_request_url":"https://api.github.com/repos/3scale/porta/pulls/87","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/3scale/porta/pulls/comments/222382359"},"html":{"href":"https://github.com/3scale/porta/pull/87#discussion_r222382359"},"pull_request":{"href":"https://api.github.com/repos/3scale/porta/pulls/87"}}},"pull_request":{"url":"https://api.github.com/repos/3scale/porta/pulls/87","id":219994723,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5OTk0NzIz","html_url":"https://github.com/3scale/porta/pull/87","diff_url":"https://github.com/3scale/porta/pull/87.diff","patch_url":"https://github.com/3scale/porta/pull/87.patch","issue_url":"https://api.github.com/repos/3scale/porta/issues/87","number":87,"state":"open","locked":false,"title":"[WIP] Permissions in a service-driven navigation context","user":{"login":"thomasmaas","id":54224,"node_id":"MDQ6VXNlcjU0MjI0","avatar_url":"https://avatars1.githubusercontent.com/u/54224?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasmaas","html_url":"https://github.com/thomasmaas","followers_url":"https://api.github.com/users/thomasmaas/followers","following_url":"https://api.github.com/users/thomasmaas/following{/other_user}","gists_url":"https://api.github.com/users/thomasmaas/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasmaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasmaas/subscriptions","organizations_url":"https://api.github.com/users/thomasmaas/orgs","repos_url":"https://api.github.com/users/thomasmaas/repos","events_url":"https://api.github.com/users/thomasmaas/events{/privacy}","received_events_url":"https://api.github.com/users/thomasmaas/received_events","type":"User","site_admin":false},"body":"**What this PR does / why we need it**:\r\n\r\nIn a service driven navigation context \"applications\" and \"active docs\" sit inside the \"API\" menu. Also, the dashboard is the new API's page. We need more granular checks for showing/hiding service related content on the dashboard. (at this moment we only show service on dashboard if user can manage analytics.) We also need to make decisons which permission unlocks active docs and definition (metrics) as they are not locked at all at this moment.\r\n\r\nthings we won't do:\r\n- fix api's top navigation level for members with app only access. This section will be gone in 2 weeks.\r\n\r\nto do:\r\n- [x] show minimal info on dashboard when user has access to applications\r\n- [x] hide service menu items for which no access has been given\r\n- [ ] lock down active docs & metrics controller [ future pr]\r\n\r\nMember with applications access for some services will see those services and links to applications of those services on the dashboard.\r\n\r\n<img width=\"1273\" alt=\"screenshot 2018-10-03 18 20 49\" src=\"https://user-images.githubusercontent.com/54224/46424590-db3be900-c739-11e8-85f9-6c138c13dd66.png\">\r\n\r\nthat person will have a bit of a broken applications view (no top nav is active) but this will be fixed when we switch to PF vertical navigation.\r\n\r\n<img width=\"1661\" alt=\"screenshot 2018-10-03 18 28 04\" src=\"https://user-images.githubusercontent.com/54224/46424741-3968cc00-c73a-11e8-9802-e8bc08ba0ec3.png\">\r\n","created_at":"2018-10-03T10:58:06Z","updated_at":"2018-10-03T16:39:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a1581ed6fc9ad13404a8e22ce362e7815332d7d","assignee":{"login":"thomasmaas","id":54224,"node_id":"MDQ6VXNlcjU0MjI0","avatar_url":"https://avatars1.githubusercontent.com/u/54224?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasmaas","html_url":"https://github.com/thomasmaas","followers_url":"https://api.github.com/users/thomasmaas/followers","following_url":"https://api.github.com/users/thomasmaas/following{/other_user}","gists_url":"https://api.github.com/users/thomasmaas/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasmaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasmaas/subscriptions","organizations_url":"https://api.github.com/users/thomasmaas/orgs","repos_url":"https://api.github.com/users/thomasmaas/repos","events_url":"https://api.github.com/users/thomasmaas/events{/privacy}","received_events_url":"https://api.github.com/users/thomasmaas/received_events","type":"User","site_admin":false},"assignees":[{"login":"thomasmaas","id":54224,"node_id":"MDQ6VXNlcjU0MjI0","avatar_url":"https://avatars1.githubusercontent.com/u/54224?v=4","gravatar_id":"","url":"https://api.github.com/users/thomasmaas","html_url":"https://github.com/thomasmaas","followers_url":"https://api.github.com/users/thomasmaas/followers","following_url":"https://api.github.com/users/thomasmaas/following{/other_user}","gists_url":"https://api.github.com/users/thomasmaas/gists{/gist_id}","starred_url":"https://api.github.com/users/thomasmaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thomasmaas/subscriptions","organizations_url":"https://api.github.com/users/thomasmaas/orgs","repos_url":"https://api.github.com/users/thomasmaas/repos","events_url":"https://api.github.com/users/thomasmaas/events{/privacy}","received_events_url":"https://api.github.com/users/thomasmaas/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":1061163922,"node_id":"MDU6TGFiZWwxMDYxMTYzOTIy","url":"https://api.github.com/repos/3scale/porta/labels/jenkins","name":"jenkins","color":"c2e0c6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/3scale/porta/pulls/87/commits","review_comments_url":"https://api.github.com/repos/3scale/porta/pulls/87/comments","review_comment_url":"https://api.github.com/repos/3scale/porta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/3scale/porta/issues/87/comments","statuses_url":"https://api.github.com/repos/3scale/porta/statuses/8a84891d4053c5a19920b216572898b90a0f5ced","head":{"label":"3scale:permissions-in-a-service-driven-navigation-context","ref":"permissions-in-a-service-driven-navigation-context","sha":"8a84891d4053c5a19920b216572898b90a0f5ced","user":{"login":"3scale","id":21415,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxNDE1","avatar_url":"https://avatars0.githubusercontent.com/u/21415?v=4","gravatar_id":"","url":"https://api.github.com/users/3scale","html_url":"https://github.com/3scale","followers_url":"https://api.github.com/users/3scale/followers","following_url":"https://api.github.com/users/3scale/following{/other_user}","gists_url":"https://api.github.com/users/3scale/gists{/gist_id}","starred_url":"https://api.github.com/users/3scale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3scale/subscriptions","organizations_url":"https://api.github.com/users/3scale/orgs","repos_url":"https://api.github.com/users/3scale/repos","events_url":"https://api.github.com/users/3scale/events{/privacy}","received_events_url":"https://api.github.com/users/3scale/received_events","type":"Organization","site_admin":false},"repo":{"id":149315920,"node_id":"MDEwOlJlcG9zaXRvcnkxNDkzMTU5MjA=","name":"porta","full_name":"3scale/porta","private":false,"owner":{"login":"3scale","id":21415,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxNDE1","avatar_url":"https://avatars0.githubusercontent.com/u/21415?v=4","gravatar_id":"","url":"https://api.github.com/users/3scale","html_url":"https://github.com/3scale","followers_url":"https://api.github.com/users/3scale/followers","following_url":"https://api.github.com/users/3scale/following{/other_user}","gists_url":"https://api.github.com/users/3scale/gists{/gist_id}","starred_url":"https://api.github.com/users/3scale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3scale/subscriptions","organizations_url":"https://api.github.com/users/3scale/orgs","repos_url":"https://api.github.com/users/3scale/repos","events_url":"https://api.github.com/users/3scale/events{/privacy}","received_events_url":"https://api.github.com/users/3scale/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/3scale/porta","description":"Red Hat 3scale API Management User Interface","fork":false,"url":"https://api.github.com/repos/3scale/porta","forks_url":"https://api.github.com/repos/3scale/porta/forks","keys_url":"https://api.github.com/repos/3scale/porta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/3scale/porta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/3scale/porta/teams","hooks_url":"https://api.github.com/repos/3scale/porta/hooks","issue_events_url":"https://api.github.com/repos/3scale/porta/issues/events{/number}","events_url":"https://api.github.com/repos/3scale/porta/events","assignees_url":"https://api.github.com/repos/3scale/porta/assignees{/user}","branches_url":"https://api.github.com/repos/3scale/porta/branches{/branch}","tags_url":"https://api.github.com/repos/3scale/porta/tags","blobs_url":"https://api.github.com/repos/3scale/porta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/3scale/porta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/3scale/porta/git/refs{/sha}","trees_url":"https://api.github.com/repos/3scale/porta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/3scale/porta/statuses/{sha}","languages_url":"https://api.github.com/repos/3scale/porta/languages","stargazers_url":"https://api.github.com/repos/3scale/porta/stargazers","contributors_url":"https://api.github.com/repos/3scale/porta/contributors","subscribers_url":"https://api.github.com/repos/3scale/porta/subscribers","subscription_url":"https://api.github.com/repos/3scale/porta/subscription","commits_url":"https://api.github.com/repos/3scale/porta/commits{/sha}","git_commits_url":"https://api.github.com/repos/3scale/porta/git/commits{/sha}","comments_url":"https://api.github.com/repos/3scale/porta/comments{/number}","issue_comment_url":"https://api.github.com/repos/3scale/porta/issues/comments{/number}","contents_url":"https://api.github.com/repos/3scale/porta/contents/{+path}","compare_url":"https://api.github.com/repos/3scale/porta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/3scale/porta/merges","archive_url":"https://api.github.com/repos/3scale/porta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/3scale/porta/downloads","issues_url":"https://api.github.com/repos/3scale/porta/issues{/number}","pulls_url":"https://api.github.com/repos/3scale/porta/pulls{/number}","milestones_url":"https://api.github.com/repos/3scale/porta/milestones{/number}","notifications_url":"https://api.github.com/repos/3scale/porta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/3scale/porta/labels{/name}","releases_url":"https://api.github.com/repos/3scale/porta/releases{/id}","deployments_url":"https://api.github.com/repos/3scale/porta/deployments","created_at":"2018-09-18T16:03:13Z","updated_at":"2018-10-03T16:09:03Z","pushed_at":"2018-10-03T16:38:38Z","git_url":"git://github.com/3scale/porta.git","ssh_url":"git@github.com:3scale/porta.git","clone_url":"https://github.com/3scale/porta.git","svn_url":"https://github.com/3scale/porta","homepage":"","size":17916,"stargazers_count":8,"watchers_count":8,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":3,"open_issues":46,"watchers":8,"default_branch":"master"}},"base":{"label":"3scale:master","ref":"master","sha":"a16551cf0ff2270b8ca681de447f52cad9296a9b","user":{"login":"3scale","id":21415,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxNDE1","avatar_url":"https://avatars0.githubusercontent.com/u/21415?v=4","gravatar_id":"","url":"https://api.github.com/users/3scale","html_url":"https://github.com/3scale","followers_url":"https://api.github.com/users/3scale/followers","following_url":"https://api.github.com/users/3scale/following{/other_user}","gists_url":"https://api.github.com/users/3scale/gists{/gist_id}","starred_url":"https://api.github.com/users/3scale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3scale/subscriptions","organizations_url":"https://api.github.com/users/3scale/orgs","repos_url":"https://api.github.com/users/3scale/repos","events_url":"https://api.github.com/users/3scale/events{/privacy}","received_events_url":"https://api.github.com/users/3scale/received_events","type":"Organization","site_admin":false},"repo":{"id":149315920,"node_id":"MDEwOlJlcG9zaXRvcnkxNDkzMTU5MjA=","name":"porta","full_name":"3scale/porta","private":false,"owner":{"login":"3scale","id":21415,"node_id":"MDEyOk9yZ2FuaXphdGlvbjIxNDE1","avatar_url":"https://avatars0.githubusercontent.com/u/21415?v=4","gravatar_id":"","url":"https://api.github.com/users/3scale","html_url":"https://github.com/3scale","followers_url":"https://api.github.com/users/3scale/followers","following_url":"https://api.github.com/users/3scale/following{/other_user}","gists_url":"https://api.github.com/users/3scale/gists{/gist_id}","starred_url":"https://api.github.com/users/3scale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3scale/subscriptions","organizations_url":"https://api.github.com/users/3scale/orgs","repos_url":"https://api.github.com/users/3scale/repos","events_url":"https://api.github.com/users/3scale/events{/privacy}","received_events_url":"https://api.github.com/users/3scale/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/3scale/porta","description":"Red Hat 3scale API Management User Interface","fork":false,"url":"https://api.github.com/repos/3scale/porta","forks_url":"https://api.github.com/repos/3scale/porta/forks","keys_url":"https://api.github.com/repos/3scale/porta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/3scale/porta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/3scale/porta/teams","hooks_url":"https://api.github.com/repos/3scale/porta/hooks","issue_events_url":"https://api.github.com/repos/3scale/porta/issues/events{/number}","events_url":"https://api.github.com/repos/3scale/porta/events","assignees_url":"https://api.github.com/repos/3scale/porta/assignees{/user}","branches_url":"https://api.github.com/repos/3scale/porta/branches{/branch}","tags_url":"https://api.github.com/repos/3scale/porta/tags","blobs_url":"https://api.github.com/repos/3scale/porta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/3scale/porta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/3scale/porta/git/refs{/sha}","trees_url":"https://api.github.com/repos/3scale/porta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/3scale/porta/statuses/{sha}","languages_url":"https://api.github.com/repos/3scale/porta/languages","stargazers_url":"https://api.github.com/repos/3scale/porta/stargazers","contributors_url":"https://api.github.com/repos/3scale/porta/contributors","subscribers_url":"https://api.github.com/repos/3scale/porta/subscribers","subscription_url":"https://api.github.com/repos/3scale/porta/subscription","commits_url":"https://api.github.com/repos/3scale/porta/commits{/sha}","git_commits_url":"https://api.github.com/repos/3scale/porta/git/commits{/sha}","comments_url":"https://api.github.com/repos/3scale/porta/comments{/number}","issue_comment_url":"https://api.github.com/repos/3scale/porta/issues/comments{/number}","contents_url":"https://api.github.com/repos/3scale/porta/contents/{+path}","compare_url":"https://api.github.com/repos/3scale/porta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/3scale/porta/merges","archive_url":"https://api.github.com/repos/3scale/porta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/3scale/porta/downloads","issues_url":"https://api.github.com/repos/3scale/porta/issues{/number}","pulls_url":"https://api.github.com/repos/3scale/porta/pulls{/number}","milestones_url":"https://api.github.com/repos/3scale/porta/milestones{/number}","notifications_url":"https://api.github.com/repos/3scale/porta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/3scale/porta/labels{/name}","releases_url":"https://api.github.com/repos/3scale/porta/releases{/id}","deployments_url":"https://api.github.com/repos/3scale/porta/deployments","created_at":"2018-09-18T16:03:13Z","updated_at":"2018-10-03T16:09:03Z","pushed_at":"2018-10-03T16:38:38Z","git_url":"git://github.com/3scale/porta.git","ssh_url":"git@github.com:3scale/porta.git","clone_url":"https://github.com/3scale/porta.git","svn_url":"https://github.com/3scale/porta","homepage":"","size":17916,"stargazers_count":8,"watchers_count":8,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"other","name":"NOASSERTION","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":3,"open_issues":46,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/3scale/porta/pulls/87"},"html":{"href":"https://github.com/3scale/porta/pull/87"},"issue":{"href":"https://api.github.com/repos/3scale/porta/issues/87"},"comments":{"href":"https://api.github.com/repos/3scale/porta/issues/87/comments"},"review_comments":{"href":"https://api.github.com/repos/3scale/porta/pulls/87/comments"},"review_comment":{"href":"https://api.github.com/repos/3scale/porta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/3scale/porta/pulls/87/commits"},"statuses":{"href":"https://api.github.com/repos/3scale/porta/statuses/8a84891d4053c5a19920b216572898b90a0f5ced"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"Martouta"}}