{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/carbon-commons/pulls/comments/187531451","pull_request_review_id":119331050,"id":187531451,"diff_hunk":"@@ -31,11 +32,23 @@\n \n <%\n     String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);\n+    Boolean allowCappDelete = false;\n     ConfigurationContext configContext =\n             (ConfigurationContext) config.getServletContext().getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);\n \n     String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);\n \n+    ArrayList<String> permissions = (ArrayList<String>) session.getAttribute(ServerConstants.USER_PERMISSIONS);\n+    if (permissions.contains(\"/permission\")\n+        || permissions.contains(\"/permission/admin\")\n+        || permissions.contains(\"/permission/admin/manage\")\n+        || permissions.contains(\"/permission/admin/manage/capps\")) {\n+        allowCappDelete = true;\n+    } else if (permissions.contains(\"/permission/admin/manage/capps/add\")","path":"components/application-mgt/org.wso2.carbon.application.mgt.ui/src/main/resources/web/carbonapps/index.jsp","position":null,"original_position":24,"commit_id":"43e954ed9592ae77558aa65399d00d1646b137de","original_commit_id":"b0d457de2beb0aeeab8fd002f5e41d3097cf76b3","user":{"login":"GDLMadushanka","id":8251118,"avatar_url":"https://avatars2.githubusercontent.com/u/8251118?v=4","gravatar_id":"","url":"https://api.github.com/users/GDLMadushanka","html_url":"https://github.com/GDLMadushanka","followers_url":"https://api.github.com/users/GDLMadushanka/followers","following_url":"https://api.github.com/users/GDLMadushanka/following{/other_user}","gists_url":"https://api.github.com/users/GDLMadushanka/gists{/gist_id}","starred_url":"https://api.github.com/users/GDLMadushanka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GDLMadushanka/subscriptions","organizations_url":"https://api.github.com/users/GDLMadushanka/orgs","repos_url":"https://api.github.com/users/GDLMadushanka/repos","events_url":"https://api.github.com/users/GDLMadushanka/events{/privacy}","received_events_url":"https://api.github.com/users/GDLMadushanka/received_events","type":"User","site_admin":false},"body":"+1 done\r\n","created_at":"2018-05-11T06:39:49Z","updated_at":"2018-05-11T06:39:49Z","html_url":"https://github.com/wso2/carbon-commons/pull/308#discussion_r187531451","pull_request_url":"https://api.github.com/repos/wso2/carbon-commons/pulls/308","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-commons/pulls/comments/187531451"},"html":{"href":"https://github.com/wso2/carbon-commons/pull/308#discussion_r187531451"},"pull_request":{"href":"https://api.github.com/repos/wso2/carbon-commons/pulls/308"}},"in_reply_to_id":187528984},"pull_request":{"url":"https://api.github.com/repos/wso2/carbon-commons/pulls/308","id":187375456,"html_url":"https://github.com/wso2/carbon-commons/pull/308","diff_url":"https://github.com/wso2/carbon-commons/pull/308.diff","patch_url":"https://github.com/wso2/carbon-commons/pull/308.patch","issue_url":"https://api.github.com/repos/wso2/carbon-commons/issues/308","number":308,"state":"open","locked":false,"title":"Fix wso2/product-ei/issues/2164","user":{"login":"GDLMadushanka","id":8251118,"avatar_url":"https://avatars2.githubusercontent.com/u/8251118?v=4","gravatar_id":"","url":"https://api.github.com/users/GDLMadushanka","html_url":"https://github.com/GDLMadushanka","followers_url":"https://api.github.com/users/GDLMadushanka/followers","following_url":"https://api.github.com/users/GDLMadushanka/following{/other_user}","gists_url":"https://api.github.com/users/GDLMadushanka/gists{/gist_id}","starred_url":"https://api.github.com/users/GDLMadushanka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GDLMadushanka/subscriptions","organizations_url":"https://api.github.com/users/GDLMadushanka/orgs","repos_url":"https://api.github.com/users/GDLMadushanka/repos","events_url":"https://api.github.com/users/GDLMadushanka/events{/privacy}","received_events_url":"https://api.github.com/users/GDLMadushanka/received_events","type":"User","site_admin":false},"body":"## Purpose\r\n> Filter users who don't have permissions to delete capps.\r\n\r\n## Goals\r\n> Delete option should not be visible to users who don't have necessary permissions.\r\n\r\n## Approach\r\n> Check for user permissions in the jsp file\r\n\r\n## Related PRs\r\n> https://github.com/wso2/carbon-commons/pull/306\r\n\r\n## Test environment\r\n> JDK8","created_at":"2018-05-11T06:10:43Z","updated_at":"2018-05-11T06:39:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f2f486682f4f32840d25140b6f7bcd4c3aa12a52","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wso2/carbon-commons/pulls/308/commits","review_comments_url":"https://api.github.com/repos/wso2/carbon-commons/pulls/308/comments","review_comment_url":"https://api.github.com/repos/wso2/carbon-commons/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/carbon-commons/issues/308/comments","statuses_url":"https://api.github.com/repos/wso2/carbon-commons/statuses/43e954ed9592ae77558aa65399d00d1646b137de","head":{"label":"GDLMadushanka:permissionFix","ref":"permissionFix","sha":"43e954ed9592ae77558aa65399d00d1646b137de","user":{"login":"GDLMadushanka","id":8251118,"avatar_url":"https://avatars2.githubusercontent.com/u/8251118?v=4","gravatar_id":"","url":"https://api.github.com/users/GDLMadushanka","html_url":"https://github.com/GDLMadushanka","followers_url":"https://api.github.com/users/GDLMadushanka/followers","following_url":"https://api.github.com/users/GDLMadushanka/following{/other_user}","gists_url":"https://api.github.com/users/GDLMadushanka/gists{/gist_id}","starred_url":"https://api.github.com/users/GDLMadushanka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GDLMadushanka/subscriptions","organizations_url":"https://api.github.com/users/GDLMadushanka/orgs","repos_url":"https://api.github.com/users/GDLMadushanka/repos","events_url":"https://api.github.com/users/GDLMadushanka/events{/privacy}","received_events_url":"https://api.github.com/users/GDLMadushanka/received_events","type":"User","site_admin":false},"repo":{"id":132996545,"name":"carbon-commons-1","full_name":"GDLMadushanka/carbon-commons-1","owner":{"login":"GDLMadushanka","id":8251118,"avatar_url":"https://avatars2.githubusercontent.com/u/8251118?v=4","gravatar_id":"","url":"https://api.github.com/users/GDLMadushanka","html_url":"https://github.com/GDLMadushanka","followers_url":"https://api.github.com/users/GDLMadushanka/followers","following_url":"https://api.github.com/users/GDLMadushanka/following{/other_user}","gists_url":"https://api.github.com/users/GDLMadushanka/gists{/gist_id}","starred_url":"https://api.github.com/users/GDLMadushanka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GDLMadushanka/subscriptions","organizations_url":"https://api.github.com/users/GDLMadushanka/orgs","repos_url":"https://api.github.com/users/GDLMadushanka/repos","events_url":"https://api.github.com/users/GDLMadushanka/events{/privacy}","received_events_url":"https://api.github.com/users/GDLMadushanka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GDLMadushanka/carbon-commons-1","description":null,"fork":true,"url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1","forks_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/forks","keys_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/teams","hooks_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/hooks","issue_events_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/issues/events{/number}","events_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/events","assignees_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/assignees{/user}","branches_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/branches{/branch}","tags_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/tags","blobs_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/statuses/{sha}","languages_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/languages","stargazers_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/stargazers","contributors_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/contributors","subscribers_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/subscribers","subscription_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/subscription","commits_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/contents/{+path}","compare_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/merges","archive_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/downloads","issues_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/issues{/number}","pulls_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/pulls{/number}","milestones_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/milestones{/number}","notifications_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/labels{/name}","releases_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/releases{/id}","deployments_url":"https://api.github.com/repos/GDLMadushanka/carbon-commons-1/deployments","created_at":"2018-05-11T06:07:05Z","updated_at":"2018-05-11T06:07:10Z","pushed_at":"2018-05-11T06:36:30Z","git_url":"git://github.com/GDLMadushanka/carbon-commons-1.git","ssh_url":"git@github.com:GDLMadushanka/carbon-commons-1.git","clone_url":"https://github.com/GDLMadushanka/carbon-commons-1.git","svn_url":"https://github.com/GDLMadushanka/carbon-commons-1","homepage":null,"size":19800,"stargazers_count":0,"watchers_count":0,"language":"Java","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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2:master","ref":"master","sha":"a3e5511e6d90fe282b4953fa1948f1d0b722448d","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars3.githubusercontent.com/u/533043?v=4","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":16501680,"name":"carbon-commons","full_name":"wso2/carbon-commons","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars3.githubusercontent.com/u/533043?v=4","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/carbon-commons","description":null,"fork":false,"url":"https://api.github.com/repos/wso2/carbon-commons","forks_url":"https://api.github.com/repos/wso2/carbon-commons/forks","keys_url":"https://api.github.com/repos/wso2/carbon-commons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/carbon-commons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/carbon-commons/teams","hooks_url":"https://api.github.com/repos/wso2/carbon-commons/hooks","issue_events_url":"https://api.github.com/repos/wso2/carbon-commons/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/carbon-commons/events","assignees_url":"https://api.github.com/repos/wso2/carbon-commons/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/carbon-commons/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/carbon-commons/tags","blobs_url":"https://api.github.com/repos/wso2/carbon-commons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/carbon-commons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/carbon-commons/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/carbon-commons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/carbon-commons/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/carbon-commons/languages","stargazers_url":"https://api.github.com/repos/wso2/carbon-commons/stargazers","contributors_url":"https://api.github.com/repos/wso2/carbon-commons/contributors","subscribers_url":"https://api.github.com/repos/wso2/carbon-commons/subscribers","subscription_url":"https://api.github.com/repos/wso2/carbon-commons/subscription","commits_url":"https://api.github.com/repos/wso2/carbon-commons/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/carbon-commons/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/carbon-commons/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/carbon-commons/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/carbon-commons/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/carbon-commons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/carbon-commons/merges","archive_url":"https://api.github.com/repos/wso2/carbon-commons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/carbon-commons/downloads","issues_url":"https://api.github.com/repos/wso2/carbon-commons/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/carbon-commons/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/carbon-commons/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/carbon-commons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/carbon-commons/labels{/name}","releases_url":"https://api.github.com/repos/wso2/carbon-commons/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/carbon-commons/deployments","created_at":"2014-02-04T03:53:48Z","updated_at":"2018-05-10T07:26:26Z","pushed_at":"2018-05-11T06:36:31Z","git_url":"git://github.com/wso2/carbon-commons.git","ssh_url":"git@github.com:wso2/carbon-commons.git","clone_url":"https://github.com/wso2/carbon-commons.git","svn_url":"https://github.com/wso2/carbon-commons","homepage":null,"size":19800,"stargazers_count":4,"watchers_count":4,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":162,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":162,"open_issues":10,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-commons/pulls/308"},"html":{"href":"https://github.com/wso2/carbon-commons/pull/308"},"issue":{"href":"https://api.github.com/repos/wso2/carbon-commons/issues/308"},"comments":{"href":"https://api.github.com/repos/wso2/carbon-commons/issues/308/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/carbon-commons/pulls/308/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/carbon-commons/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/carbon-commons/pulls/308/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/carbon-commons/statuses/43e954ed9592ae77558aa65399d00d1646b137de"}},"author_association":"NONE"}}
{"actor":{"display_login":"GDLMadushanka"}}