{"action":"created","comment":{"url":"https://api.github.com/repos/tmobile/jazz/pulls/comments/242933762","pull_request_review_id":186567629,"id":242933762,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MjkzMzc2Mg==","diff_hunk":"@@ -357,10 +359,49 @@ var validateEventName = (eventType, sourceName, config) => {\n   }\n };\n \n+var updateAclPolicy = (serviceId, authToken, user_id, permission, category, config) => {\n+    return new Promise((resolve, reject) => {\n+        let svcPayload = {\n+            uri: config.SERVICE_API_URL + config.ACL_ENDPOINT,\n+            method: 'POST',\n+            headers: { 'Authorization': authToken },\n+            json: [\n+                {\n+                    \"serviceId\": serviceId,\n+                    \"policies\": [\n+                        {\n+                            \"userId\": user_id,\n+                            \"permission\": permission,\n+                            \"category\": category\n+                        }\n+                    ]\n+                }\n+            ],\n+            rejectUnauthorized: false\n+        };\n+\n+        request(svcPayload, (error, response, body) => {\n+            if(error) {\n+                logger.error(`Error while updating policies using ACL: ${error}`);\n+                reject(error);\n+            } else {\n+                logger.debug(`ACL response: ${JSON.stringify(response)}`);\n+                if(body && body.data && body.data.success) {\n+                    resolve();\n+                } else {\n+                    logger.error(`Error while updating policies using ACL: ${JSON.stringify(response)}`);\n+                    reject(response);","path":"core/jazz_create-serverless-service/index.js","position":null,"original_position":67,"commit_id":"7a4d432376ed48550603305f41c362e16f575aaa","original_commit_id":"699538359931bc0d314680ec3bbbcaf019f451d5","user":{"login":"supritat","id":33751253,"node_id":"MDQ6VXNlcjMzNzUxMjUz","avatar_url":"https://avatars3.githubusercontent.com/u/33751253?v=4","gravatar_id":"","url":"https://api.github.com/users/supritat","html_url":"https://github.com/supritat","followers_url":"https://api.github.com/users/supritat/followers","following_url":"https://api.github.com/users/supritat/following{/other_user}","gists_url":"https://api.github.com/users/supritat/gists{/gist_id}","starred_url":"https://api.github.com/users/supritat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supritat/subscriptions","organizations_url":"https://api.github.com/users/supritat/orgs","repos_url":"https://api.github.com/users/supritat/repos","events_url":"https://api.github.com/users/supritat/events{/privacy}","received_events_url":"https://api.github.com/users/supritat/received_events","type":"User","site_admin":false},"body":"updated.","created_at":"2018-12-19T14:25:10Z","updated_at":"2018-12-19T14:25:11Z","html_url":"https://github.com/tmobile/jazz/pull/674#discussion_r242933762","pull_request_url":"https://api.github.com/repos/tmobile/jazz/pulls/674","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/tmobile/jazz/pulls/comments/242933762"},"html":{"href":"https://github.com/tmobile/jazz/pull/674#discussion_r242933762"},"pull_request":{"href":"https://api.github.com/repos/tmobile/jazz/pulls/674"}},"in_reply_to_id":242919592},"pull_request":{"url":"https://api.github.com/repos/tmobile/jazz/pulls/674","id":238969314,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM4OTY5MzE0","html_url":"https://github.com/tmobile/jazz/pull/674","diff_url":"https://github.com/tmobile/jazz/pull/674.diff","patch_url":"https://github.com/tmobile/jazz/pull/674.patch","issue_url":"https://api.github.com/repos/tmobile/jazz/issues/674","number":674,"state":"open","locked":false,"title":"ACL implementation in create-service work flow","user":{"login":"supritat","id":33751253,"node_id":"MDQ6VXNlcjMzNzUxMjUz","avatar_url":"https://avatars3.githubusercontent.com/u/33751253?v=4","gravatar_id":"","url":"https://api.github.com/users/supritat","html_url":"https://github.com/supritat","followers_url":"https://api.github.com/users/supritat/followers","following_url":"https://api.github.com/users/supritat/following{/other_user}","gists_url":"https://api.github.com/users/supritat/gists{/gist_id}","starred_url":"https://api.github.com/users/supritat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supritat/subscriptions","organizations_url":"https://api.github.com/users/supritat/orgs","repos_url":"https://api.github.com/users/supritat/repos","events_url":"https://api.github.com/users/supritat/events{/privacy}","received_events_url":"https://api.github.com/users/supritat/received_events","type":"User","site_admin":false},"body":"### Requirements\r\n\r\n* ACL implementation: Update admin permission while creating service.\r\n\r\n### Description of the Change\r\n\r\n* ACL implementation in create-serverless-service API to provide admin permission for manage category\r\n*  ACL implementation in service-onboarding-build-pack jenkins file to provide admin permission for code and deploy category\r\n\r\n### Benefits\r\n\r\nService owner will be getting admin permission for all the categories.\r\n\r\n### Possible Drawbacks\r\n\r\nNA\r\n### Applicable Issues\r\n\r\nNA","created_at":"2018-12-16T14:25:28Z","updated_at":"2018-12-19T14:25:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f65a0510a9c70588baf2132ead5b62f8ea439eb2","assignee":null,"assignees":[],"requested_reviewers":[{"login":"devsatishm","id":10748272,"node_id":"MDQ6VXNlcjEwNzQ4Mjcy","avatar_url":"https://avatars2.githubusercontent.com/u/10748272?v=4","gravatar_id":"","url":"https://api.github.com/users/devsatishm","html_url":"https://github.com/devsatishm","followers_url":"https://api.github.com/users/devsatishm/followers","following_url":"https://api.github.com/users/devsatishm/following{/other_user}","gists_url":"https://api.github.com/users/devsatishm/gists{/gist_id}","starred_url":"https://api.github.com/users/devsatishm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devsatishm/subscriptions","organizations_url":"https://api.github.com/users/devsatishm/orgs","repos_url":"https://api.github.com/users/devsatishm/repos","events_url":"https://api.github.com/users/devsatishm/events{/privacy}","received_events_url":"https://api.github.com/users/devsatishm/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tmobile/jazz/pulls/674/commits","review_comments_url":"https://api.github.com/repos/tmobile/jazz/pulls/674/comments","review_comment_url":"https://api.github.com/repos/tmobile/jazz/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tmobile/jazz/issues/674/comments","statuses_url":"https://api.github.com/repos/tmobile/jazz/statuses/7a4d432376ed48550603305f41c362e16f575aaa","head":{"label":"supritat:acl","ref":"acl","sha":"7a4d432376ed48550603305f41c362e16f575aaa","user":{"login":"supritat","id":33751253,"node_id":"MDQ6VXNlcjMzNzUxMjUz","avatar_url":"https://avatars3.githubusercontent.com/u/33751253?v=4","gravatar_id":"","url":"https://api.github.com/users/supritat","html_url":"https://github.com/supritat","followers_url":"https://api.github.com/users/supritat/followers","following_url":"https://api.github.com/users/supritat/following{/other_user}","gists_url":"https://api.github.com/users/supritat/gists{/gist_id}","starred_url":"https://api.github.com/users/supritat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supritat/subscriptions","organizations_url":"https://api.github.com/users/supritat/orgs","repos_url":"https://api.github.com/users/supritat/repos","events_url":"https://api.github.com/users/supritat/events{/privacy}","received_events_url":"https://api.github.com/users/supritat/received_events","type":"User","site_admin":false},"repo":{"id":119677224,"node_id":"MDEwOlJlcG9zaXRvcnkxMTk2NzcyMjQ=","name":"jazz","full_name":"supritat/jazz","private":false,"owner":{"login":"supritat","id":33751253,"node_id":"MDQ6VXNlcjMzNzUxMjUz","avatar_url":"https://avatars3.githubusercontent.com/u/33751253?v=4","gravatar_id":"","url":"https://api.github.com/users/supritat","html_url":"https://github.com/supritat","followers_url":"https://api.github.com/users/supritat/followers","following_url":"https://api.github.com/users/supritat/following{/other_user}","gists_url":"https://api.github.com/users/supritat/gists{/gist_id}","starred_url":"https://api.github.com/users/supritat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/supritat/subscriptions","organizations_url":"https://api.github.com/users/supritat/orgs","repos_url":"https://api.github.com/users/supritat/repos","events_url":"https://api.github.com/users/supritat/events{/privacy}","received_events_url":"https://api.github.com/users/supritat/received_events","type":"User","site_admin":false},"html_url":"https://github.com/supritat/jazz","description":"Jazz Serverless Development Platform","fork":true,"url":"https://api.github.com/repos/supritat/jazz","forks_url":"https://api.github.com/repos/supritat/jazz/forks","keys_url":"https://api.github.com/repos/supritat/jazz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/supritat/jazz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/supritat/jazz/teams","hooks_url":"https://api.github.com/repos/supritat/jazz/hooks","issue_events_url":"https://api.github.com/repos/supritat/jazz/issues/events{/number}","events_url":"https://api.github.com/repos/supritat/jazz/events","assignees_url":"https://api.github.com/repos/supritat/jazz/assignees{/user}","branches_url":"https://api.github.com/repos/supritat/jazz/branches{/branch}","tags_url":"https://api.github.com/repos/supritat/jazz/tags","blobs_url":"https://api.github.com/repos/supritat/jazz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/supritat/jazz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/supritat/jazz/git/refs{/sha}","trees_url":"https://api.github.com/repos/supritat/jazz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/supritat/jazz/statuses/{sha}","languages_url":"https://api.github.com/repos/supritat/jazz/languages","stargazers_url":"https://api.github.com/repos/supritat/jazz/stargazers","contributors_url":"https://api.github.com/repos/supritat/jazz/contributors","subscribers_url":"https://api.github.com/repos/supritat/jazz/subscribers","subscription_url":"https://api.github.com/repos/supritat/jazz/subscription","commits_url":"https://api.github.com/repos/supritat/jazz/commits{/sha}","git_commits_url":"https://api.github.com/repos/supritat/jazz/git/commits{/sha}","comments_url":"https://api.github.com/repos/supritat/jazz/comments{/number}","issue_comment_url":"https://api.github.com/repos/supritat/jazz/issues/comments{/number}","contents_url":"https://api.github.com/repos/supritat/jazz/contents/{+path}","compare_url":"https://api.github.com/repos/supritat/jazz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/supritat/jazz/merges","archive_url":"https://api.github.com/repos/supritat/jazz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/supritat/jazz/downloads","issues_url":"https://api.github.com/repos/supritat/jazz/issues{/number}","pulls_url":"https://api.github.com/repos/supritat/jazz/pulls{/number}","milestones_url":"https://api.github.com/repos/supritat/jazz/milestones{/number}","notifications_url":"https://api.github.com/repos/supritat/jazz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/supritat/jazz/labels{/name}","releases_url":"https://api.github.com/repos/supritat/jazz/releases{/id}","deployments_url":"https://api.github.com/repos/supritat/jazz/deployments","created_at":"2018-01-31T11:15:29Z","updated_at":"2018-12-17T09:06:39Z","pushed_at":"2018-12-19T14:24:08Z","git_url":"git://github.com/supritat/jazz.git","ssh_url":"git@github.com:supritat/jazz.git","clone_url":"https://github.com/supritat/jazz.git","svn_url":"https://github.com/supritat/jazz","homepage":"","size":180097,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tmobile:acl","ref":"acl","sha":"a1e1f10b4ba49134edf4e01430fbaf5df317af42","user":{"login":"tmobile","id":483040,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4MzA0MA==","avatar_url":"https://avatars0.githubusercontent.com/u/483040?v=4","gravatar_id":"","url":"https://api.github.com/users/tmobile","html_url":"https://github.com/tmobile","followers_url":"https://api.github.com/users/tmobile/followers","following_url":"https://api.github.com/users/tmobile/following{/other_user}","gists_url":"https://api.github.com/users/tmobile/gists{/gist_id}","starred_url":"https://api.github.com/users/tmobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmobile/subscriptions","organizations_url":"https://api.github.com/users/tmobile/orgs","repos_url":"https://api.github.com/users/tmobile/repos","events_url":"https://api.github.com/users/tmobile/events{/privacy}","received_events_url":"https://api.github.com/users/tmobile/received_events","type":"Organization","site_admin":false},"repo":{"id":95246216,"node_id":"MDEwOlJlcG9zaXRvcnk5NTI0NjIxNg==","name":"jazz","full_name":"tmobile/jazz","private":false,"owner":{"login":"tmobile","id":483040,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4MzA0MA==","avatar_url":"https://avatars0.githubusercontent.com/u/483040?v=4","gravatar_id":"","url":"https://api.github.com/users/tmobile","html_url":"https://github.com/tmobile","followers_url":"https://api.github.com/users/tmobile/followers","following_url":"https://api.github.com/users/tmobile/following{/other_user}","gists_url":"https://api.github.com/users/tmobile/gists{/gist_id}","starred_url":"https://api.github.com/users/tmobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmobile/subscriptions","organizations_url":"https://api.github.com/users/tmobile/orgs","repos_url":"https://api.github.com/users/tmobile/repos","events_url":"https://api.github.com/users/tmobile/events{/privacy}","received_events_url":"https://api.github.com/users/tmobile/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/tmobile/jazz","description":"Jazz Serverless Development Platform","fork":false,"url":"https://api.github.com/repos/tmobile/jazz","forks_url":"https://api.github.com/repos/tmobile/jazz/forks","keys_url":"https://api.github.com/repos/tmobile/jazz/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tmobile/jazz/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tmobile/jazz/teams","hooks_url":"https://api.github.com/repos/tmobile/jazz/hooks","issue_events_url":"https://api.github.com/repos/tmobile/jazz/issues/events{/number}","events_url":"https://api.github.com/repos/tmobile/jazz/events","assignees_url":"https://api.github.com/repos/tmobile/jazz/assignees{/user}","branches_url":"https://api.github.com/repos/tmobile/jazz/branches{/branch}","tags_url":"https://api.github.com/repos/tmobile/jazz/tags","blobs_url":"https://api.github.com/repos/tmobile/jazz/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tmobile/jazz/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tmobile/jazz/git/refs{/sha}","trees_url":"https://api.github.com/repos/tmobile/jazz/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tmobile/jazz/statuses/{sha}","languages_url":"https://api.github.com/repos/tmobile/jazz/languages","stargazers_url":"https://api.github.com/repos/tmobile/jazz/stargazers","contributors_url":"https://api.github.com/repos/tmobile/jazz/contributors","subscribers_url":"https://api.github.com/repos/tmobile/jazz/subscribers","subscription_url":"https://api.github.com/repos/tmobile/jazz/subscription","commits_url":"https://api.github.com/repos/tmobile/jazz/commits{/sha}","git_commits_url":"https://api.github.com/repos/tmobile/jazz/git/commits{/sha}","comments_url":"https://api.github.com/repos/tmobile/jazz/comments{/number}","issue_comment_url":"https://api.github.com/repos/tmobile/jazz/issues/comments{/number}","contents_url":"https://api.github.com/repos/tmobile/jazz/contents/{+path}","compare_url":"https://api.github.com/repos/tmobile/jazz/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tmobile/jazz/merges","archive_url":"https://api.github.com/repos/tmobile/jazz/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tmobile/jazz/downloads","issues_url":"https://api.github.com/repos/tmobile/jazz/issues{/number}","pulls_url":"https://api.github.com/repos/tmobile/jazz/pulls{/number}","milestones_url":"https://api.github.com/repos/tmobile/jazz/milestones{/number}","notifications_url":"https://api.github.com/repos/tmobile/jazz/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tmobile/jazz/labels{/name}","releases_url":"https://api.github.com/repos/tmobile/jazz/releases{/id}","deployments_url":"https://api.github.com/repos/tmobile/jazz/deployments","created_at":"2017-06-23T18:31:26Z","updated_at":"2018-12-19T04:59:35Z","pushed_at":"2018-12-19T14:24:09Z","git_url":"git://github.com/tmobile/jazz.git","ssh_url":"git@github.com:tmobile/jazz.git","clone_url":"https://github.com/tmobile/jazz.git","svn_url":"https://github.com/tmobile/jazz","homepage":"http://try.tmo-jazz.net/","size":187455,"stargazers_count":133,"watchers_count":133,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":69,"mirror_url":null,"archived":false,"open_issues_count":31,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":69,"open_issues":31,"watchers":133,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tmobile/jazz/pulls/674"},"html":{"href":"https://github.com/tmobile/jazz/pull/674"},"issue":{"href":"https://api.github.com/repos/tmobile/jazz/issues/674"},"comments":{"href":"https://api.github.com/repos/tmobile/jazz/issues/674/comments"},"review_comments":{"href":"https://api.github.com/repos/tmobile/jazz/pulls/674/comments"},"review_comment":{"href":"https://api.github.com/repos/tmobile/jazz/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tmobile/jazz/pulls/674/commits"},"statuses":{"href":"https://api.github.com/repos/tmobile/jazz/statuses/7a4d432376ed48550603305f41c362e16f575aaa"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"supritat"}}