{"action":"created","comment":{"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/pulls/comments/100554232","pull_request_review_id":21267307,"id":100554232,"diff_hunk":"@@ -21,4 +30,101 @@ export function RBACFactory() {\n   function all() {\n     return features;\n   }\n+\n+  function setRBACForNavigation(productFeatures) {\n+    var features = {\n+      dashboard: {show: entitledForDashboard(productFeatures)},\n+      services: {show: entitledForServices(productFeatures)},\n+      orders: {show: entitledForServices(productFeatures)},\n+      requests: {show: entitledForRequests(productFeatures)},\n+      catalogs: {show: entitledForServiceCatalogs(productFeatures)},\n+      dialogs: {show: entitledForService(productFeatures)},\n+      administration: {show: entitledForService(productFeatures)},\n+    };\n+\n+    return features;\n+  }\n+  function setNavFeatures(features) {\n+    navFeatures = features;\n+\n+    return navFeatures;\n+  }\n+  function setActionFeatures(features) {\n+    actionFeatures = features;\n+\n+    return actionFeatures;\n+  }\n+  function getActionFeatures() {\n+    return actionFeatures;\n+  }\n+  function setRBACForActions(productFeatures) {\n+    var features = {\n+      serviceView: {show: angular.isDefined(productFeatures.service_view)},\n+      serviceEdit: {show: angular.isDefined(productFeatures.service_edit)},\n+      serviceTag: {show: angular.isDefined(productFeatures.service_tag)},\n+      serviceDelete: {show: angular.isDefined(productFeatures.service_delete)},\n+      serviceReconfigure: {show: angular.isDefined(productFeatures.service_reconfigure)},\n+      serviceRetireNow: {show: angular.isDefined(productFeatures.service_retire_now)},\n+      serviceRetire: {show: angular.isDefined(productFeatures.service_retire)},\n+      serviceOwnership: {show: angular.isDefined(productFeatures.service_ownership)},\n+    };\n+\n+    return features;\n+  }\n+  function getNavFeatures() {\n+    return navFeatures;\n+  }\n+  function entitledForServices(productFeatures) {\n+    var serviceFeature = lodash.find(actionFeatures, function(o) {\n+      return o.show === true;\n+    });\n+\n+    return angular.isDefined(serviceFeature);\n+  }\n+\n+  function isAnyActionAllowed(actions, productFeatures) {\n+    for (var i = 0; i <= actions.length; i++) {","path":"client/app/core/rbac.service.js","position":85,"original_position":85,"commit_id":"d55db0fc378ae87bb7d15262de2a3ab7fae14775","original_commit_id":"d55db0fc378ae87bb7d15262de2a3ab7fae14775","user":{"login":"AllenBW","id":6640236,"avatar_url":"https://avatars.githubusercontent.com/u/6640236?v=3","gravatar_id":"","url":"https://api.github.com/users/AllenBW","html_url":"https://github.com/AllenBW","followers_url":"https://api.github.com/users/AllenBW/followers","following_url":"https://api.github.com/users/AllenBW/following{/other_user}","gists_url":"https://api.github.com/users/AllenBW/gists{/gist_id}","starred_url":"https://api.github.com/users/AllenBW/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AllenBW/subscriptions","organizations_url":"https://api.github.com/users/AllenBW/orgs","repos_url":"https://api.github.com/users/AllenBW/repos","events_url":"https://api.github.com/users/AllenBW/events{/privacy}","received_events_url":"https://api.github.com/users/AllenBW/received_events","type":"User","site_admin":false},"body":"Even less! though eslint will holla about `action` not being in parenthesis","created_at":"2017-02-10T15:15:04Z","updated_at":"2017-02-10T15:15:04Z","html_url":"https://github.com/ManageIQ/manageiq-ui-service/pull/496#discussion_r100554232","pull_request_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/pulls/496","_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/pulls/comments/100554232"},"html":{"href":"https://github.com/ManageIQ/manageiq-ui-service/pull/496#discussion_r100554232"},"pull_request":{"href":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/pulls/496"}}},"pull_request":{"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/pulls/496","id":104868367,"html_url":"https://github.com/ManageIQ/manageiq-ui-service/pull/496","diff_url":"https://github.com/ManageIQ/manageiq-ui-service/pull/496.diff","patch_url":"https://github.com/ManageIQ/manageiq-ui-service/pull/496.patch","issue_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/issues/496","number":496,"state":"open","locked":false,"title":"Fix for refresh of SUI $state.FeatureNav issue","user":{"login":"chalettu","id":230549,"avatar_url":"https://avatars.githubusercontent.com/u/230549?v=3","gravatar_id":"","url":"https://api.github.com/users/chalettu","html_url":"https://github.com/chalettu","followers_url":"https://api.github.com/users/chalettu/followers","following_url":"https://api.github.com/users/chalettu/following{/other_user}","gists_url":"https://api.github.com/users/chalettu/gists{/gist_id}","starred_url":"https://api.github.com/users/chalettu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalettu/subscriptions","organizations_url":"https://api.github.com/users/chalettu/orgs","repos_url":"https://api.github.com/users/chalettu/repos","events_url":"https://api.github.com/users/chalettu/events{/privacy}","received_events_url":"https://api.github.com/users/chalettu/received_events","type":"User","site_admin":false},"body":"Fix for Pivotal ticket https://www.pivotaltracker.com/story/show/138056447.  \n","created_at":"2017-02-06T19:48:25Z","updated_at":"2017-02-10T15:15:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b7ff433b033c076db5c32cf5bd455b6f9a3da779","assignee":{"login":"chriskacerguis","id":2414647,"avatar_url":"https://avatars.githubusercontent.com/u/2414647?v=3","gravatar_id":"","url":"https://api.github.com/users/chriskacerguis","html_url":"https://github.com/chriskacerguis","followers_url":"https://api.github.com/users/chriskacerguis/followers","following_url":"https://api.github.com/users/chriskacerguis/following{/other_user}","gists_url":"https://api.github.com/users/chriskacerguis/gists{/gist_id}","starred_url":"https://api.github.com/users/chriskacerguis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriskacerguis/subscriptions","organizations_url":"https://api.github.com/users/chriskacerguis/orgs","repos_url":"https://api.github.com/users/chriskacerguis/repos","events_url":"https://api.github.com/users/chriskacerguis/events{/privacy}","received_events_url":"https://api.github.com/users/chriskacerguis/received_events","type":"User","site_admin":false},"assignees":[{"login":"chriskacerguis","id":2414647,"avatar_url":"https://avatars.githubusercontent.com/u/2414647?v=3","gravatar_id":"","url":"https://api.github.com/users/chriskacerguis","html_url":"https://github.com/chriskacerguis","followers_url":"https://api.github.com/users/chriskacerguis/followers","following_url":"https://api.github.com/users/chriskacerguis/following{/other_user}","gists_url":"https://api.github.com/users/chriskacerguis/gists{/gist_id}","starred_url":"https://api.github.com/users/chriskacerguis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriskacerguis/subscriptions","organizations_url":"https://api.github.com/users/chriskacerguis/orgs","repos_url":"https://api.github.com/users/chriskacerguis/repos","events_url":"https://api.github.com/users/chriskacerguis/events{/privacy}","received_events_url":"https://api.github.com/users/chriskacerguis/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/milestones/18","html_url":"https://github.com/ManageIQ/manageiq-ui-service/milestone/18","labels_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/milestones/18/labels","id":2289522,"number":18,"title":"Sprint 54 Ending Feb 13, 2017","description":"","creator":{"login":"chessbyte","id":82161,"avatar_url":"https://avatars.githubusercontent.com/u/82161?v=3","gravatar_id":"","url":"https://api.github.com/users/chessbyte","html_url":"https://github.com/chessbyte","followers_url":"https://api.github.com/users/chessbyte/followers","following_url":"https://api.github.com/users/chessbyte/following{/other_user}","gists_url":"https://api.github.com/users/chessbyte/gists{/gist_id}","starred_url":"https://api.github.com/users/chessbyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chessbyte/subscriptions","organizations_url":"https://api.github.com/users/chessbyte/orgs","repos_url":"https://api.github.com/users/chessbyte/repos","events_url":"https://api.github.com/users/chessbyte/events{/privacy}","received_events_url":"https://api.github.com/users/chessbyte/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":22,"state":"open","created_at":"2017-01-31T14:15:11Z","updated_at":"2017-02-10T14:46:58Z","due_on":"2017-02-13T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/pulls/496/commits","review_comments_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/pulls/496/comments","review_comment_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/issues/496/comments","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/statuses/d55db0fc378ae87bb7d15262de2a3ab7fae14775","head":{"label":"chalettu:nav-bug","ref":"nav-bug","sha":"d55db0fc378ae87bb7d15262de2a3ab7fae14775","user":{"login":"chalettu","id":230549,"avatar_url":"https://avatars.githubusercontent.com/u/230549?v=3","gravatar_id":"","url":"https://api.github.com/users/chalettu","html_url":"https://github.com/chalettu","followers_url":"https://api.github.com/users/chalettu/followers","following_url":"https://api.github.com/users/chalettu/following{/other_user}","gists_url":"https://api.github.com/users/chalettu/gists{/gist_id}","starred_url":"https://api.github.com/users/chalettu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalettu/subscriptions","organizations_url":"https://api.github.com/users/chalettu/orgs","repos_url":"https://api.github.com/users/chalettu/repos","events_url":"https://api.github.com/users/chalettu/events{/privacy}","received_events_url":"https://api.github.com/users/chalettu/received_events","type":"User","site_admin":false},"repo":{"id":73224444,"name":"manageiq-ui-service","full_name":"chalettu/manageiq-ui-service","owner":{"login":"chalettu","id":230549,"avatar_url":"https://avatars.githubusercontent.com/u/230549?v=3","gravatar_id":"","url":"https://api.github.com/users/chalettu","html_url":"https://github.com/chalettu","followers_url":"https://api.github.com/users/chalettu/followers","following_url":"https://api.github.com/users/chalettu/following{/other_user}","gists_url":"https://api.github.com/users/chalettu/gists{/gist_id}","starred_url":"https://api.github.com/users/chalettu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chalettu/subscriptions","organizations_url":"https://api.github.com/users/chalettu/orgs","repos_url":"https://api.github.com/users/chalettu/repos","events_url":"https://api.github.com/users/chalettu/events{/privacy}","received_events_url":"https://api.github.com/users/chalettu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chalettu/manageiq-ui-service","description":"Service UI for ManageIQ","fork":true,"url":"https://api.github.com/repos/chalettu/manageiq-ui-service","forks_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/forks","keys_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/teams","hooks_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/hooks","issue_events_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/issues/events{/number}","events_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/events","assignees_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/assignees{/user}","branches_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/branches{/branch}","tags_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/tags","blobs_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/statuses/{sha}","languages_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/languages","stargazers_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/stargazers","contributors_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/contributors","subscribers_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/subscribers","subscription_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/subscription","commits_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/contents/{+path}","compare_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/merges","archive_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/downloads","issues_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/issues{/number}","pulls_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/pulls{/number}","milestones_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/milestones{/number}","notifications_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/labels{/name}","releases_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/releases{/id}","deployments_url":"https://api.github.com/repos/chalettu/manageiq-ui-service/deployments","created_at":"2016-11-08T20:30:10Z","updated_at":"2016-11-08T20:30:12Z","pushed_at":"2017-02-10T13:05:12Z","git_url":"git://github.com/chalettu/manageiq-ui-service.git","ssh_url":"git@github.com:chalettu/manageiq-ui-service.git","clone_url":"https://github.com/chalettu/manageiq-ui-service.git","svn_url":"https://github.com/chalettu/manageiq-ui-service","homepage":"","size":5518,"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":"ManageIQ:master","ref":"master","sha":"8d305c0f840469963e37be5ac6c015cfba41ffe0","user":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"repo":{"id":51539656,"name":"manageiq-ui-service","full_name":"ManageIQ/manageiq-ui-service","owner":{"login":"ManageIQ","id":1125575,"avatar_url":"https://avatars.githubusercontent.com/u/1125575?v=3","gravatar_id":"","url":"https://api.github.com/users/ManageIQ","html_url":"https://github.com/ManageIQ","followers_url":"https://api.github.com/users/ManageIQ/followers","following_url":"https://api.github.com/users/ManageIQ/following{/other_user}","gists_url":"https://api.github.com/users/ManageIQ/gists{/gist_id}","starred_url":"https://api.github.com/users/ManageIQ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ManageIQ/subscriptions","organizations_url":"https://api.github.com/users/ManageIQ/orgs","repos_url":"https://api.github.com/users/ManageIQ/repos","events_url":"https://api.github.com/users/ManageIQ/events{/privacy}","received_events_url":"https://api.github.com/users/ManageIQ/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ManageIQ/manageiq-ui-service","description":"Service UI for ManageIQ","fork":false,"url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service","forks_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/forks","keys_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/teams","hooks_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/hooks","issue_events_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/issues/events{/number}","events_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/events","assignees_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/assignees{/user}","branches_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/branches{/branch}","tags_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/tags","blobs_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/git/refs{/sha}","trees_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/statuses/{sha}","languages_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/languages","stargazers_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/stargazers","contributors_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/contributors","subscribers_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/subscribers","subscription_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/subscription","commits_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/commits{/sha}","git_commits_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/git/commits{/sha}","comments_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/comments{/number}","issue_comment_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/issues/comments{/number}","contents_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/contents/{+path}","compare_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/merges","archive_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/downloads","issues_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/issues{/number}","pulls_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/pulls{/number}","milestones_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/milestones{/number}","notifications_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/labels{/name}","releases_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/releases{/id}","deployments_url":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/deployments","created_at":"2016-02-11T19:17:13Z","updated_at":"2017-01-04T19:30:01Z","pushed_at":"2017-02-10T14:46:59Z","git_url":"git://github.com/ManageIQ/manageiq-ui-service.git","ssh_url":"git@github.com:ManageIQ/manageiq-ui-service.git","clone_url":"https://github.com/ManageIQ/manageiq-ui-service.git","svn_url":"https://github.com/ManageIQ/manageiq-ui-service","homepage":"","size":5644,"stargazers_count":10,"watchers_count":10,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":39,"mirror_url":null,"open_issues_count":7,"forks":39,"open_issues":7,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/pulls/496"},"html":{"href":"https://github.com/ManageIQ/manageiq-ui-service/pull/496"},"issue":{"href":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/issues/496"},"comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/issues/496/comments"},"review_comments":{"href":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/pulls/496/comments"},"review_comment":{"href":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/pulls/496/commits"},"statuses":{"href":"https://api.github.com/repos/ManageIQ/manageiq-ui-service/statuses/d55db0fc378ae87bb7d15262de2a3ab7fae14775"}}}}
{"actor":{"display_login":"AllenBW"}}