{"action":"closed","number":35858,"pull_request":{"url":"https://api.github.com/repos/brianchandotcom/liferay-portal/pulls/35858","id":58884586,"html_url":"https://github.com/brianchandotcom/liferay-portal/pull/35858","diff_url":"https://github.com/brianchandotcom/liferay-portal/pull/35858.diff","patch_url":"https://github.com/brianchandotcom/liferay-portal/pull/35858.patch","issue_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/issues/35858","number":35858,"state":"closed","locked":false,"title":"LPS-61795 Local staging permissions I","user":{"login":"topolik","id":148147,"avatar_url":"https://avatars.githubusercontent.com/u/148147?v=3","gravatar_id":"","url":"https://api.github.com/users/topolik","html_url":"https://github.com/topolik","followers_url":"https://api.github.com/users/topolik/followers","following_url":"https://api.github.com/users/topolik/following{/other_user}","gists_url":"https://api.github.com/users/topolik/gists{/gist_id}","starred_url":"https://api.github.com/users/topolik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topolik/subscriptions","organizations_url":"https://api.github.com/users/topolik/orgs","repos_url":"https://api.github.com/users/topolik/repos","events_url":"https://api.github.com/users/topolik/events{/privacy}","received_events_url":"https://api.github.com/users/topolik/received_events","type":"User","site_admin":false},"body":"Hi Brian,\r\n\r\nfirst part of #35810. Here I collected prerequisites for the next part.\r\n\r\n*Summary:*\r\nIn local staging we use always live groupId for permission checking.\r\n=> Based on a discussion with Ray, any Group related roles and site/organization/UserGroup assignments must be done using live groupId, otherwise permission framework won't find them.\r\n\r\n(1) The core idea is to make sure API consumers use live groupId for roles assignments and site/organization/UserGroup/Role memberships. \r\n(2) Next idea is to harden portal framework instead of fixing portlets and API consumers.\r\n\r\nA commit by commit explanation:\r\n\r\n**LPS-61795 Move existing user/organization/user-group assignments** (7b32dd4)\r\n\r\nA VerifyProces that rewrites existing staging groupIds into live groupIds in Organization,Site,UserGroup and Role.\r\n\r\n**LPS-61795 Fix ULSI to allow advices to intercept the calls** (6ec31d1)\r\n\r\nMake sure the call goes through advices stack\r\n\r\n**LPS-61795 (1) First remove roles relations and after then the group (2) Local staging groups don't have roles relations** (f51a3a0)\r\n\r\nBug fix - avoid NPE caused by incorrect order of entities removal.","created_at":"2016-02-10T12:35:37Z","updated_at":"2016-02-10T22:46:16Z","closed_at":"2016-02-10T22:46:16Z","merged_at":null,"merge_commit_sha":"7bc62ed7cfcaa4a5dcbe86cb8a58be98be53be3c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/pulls/35858/commits","review_comments_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/pulls/35858/comments","review_comment_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/issues/35858/comments","statuses_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/statuses/9e5fa723f9f7af9802dd3a8a4b52ce91f79013ef","head":{"label":"topolik:LPS-61795-III","ref":"LPS-61795-III","sha":"9e5fa723f9f7af9802dd3a8a4b52ce91f79013ef","user":{"login":"topolik","id":148147,"avatar_url":"https://avatars.githubusercontent.com/u/148147?v=3","gravatar_id":"","url":"https://api.github.com/users/topolik","html_url":"https://github.com/topolik","followers_url":"https://api.github.com/users/topolik/followers","following_url":"https://api.github.com/users/topolik/following{/other_user}","gists_url":"https://api.github.com/users/topolik/gists{/gist_id}","starred_url":"https://api.github.com/users/topolik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topolik/subscriptions","organizations_url":"https://api.github.com/users/topolik/orgs","repos_url":"https://api.github.com/users/topolik/repos","events_url":"https://api.github.com/users/topolik/events{/privacy}","received_events_url":"https://api.github.com/users/topolik/received_events","type":"User","site_admin":false},"repo":{"id":3853423,"name":"liferay-portal","full_name":"topolik/liferay-portal","owner":{"login":"topolik","id":148147,"avatar_url":"https://avatars.githubusercontent.com/u/148147?v=3","gravatar_id":"","url":"https://api.github.com/users/topolik","html_url":"https://github.com/topolik","followers_url":"https://api.github.com/users/topolik/followers","following_url":"https://api.github.com/users/topolik/following{/other_user}","gists_url":"https://api.github.com/users/topolik/gists{/gist_id}","starred_url":"https://api.github.com/users/topolik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/topolik/subscriptions","organizations_url":"https://api.github.com/users/topolik/orgs","repos_url":"https://api.github.com/users/topolik/repos","events_url":"https://api.github.com/users/topolik/events{/privacy}","received_events_url":"https://api.github.com/users/topolik/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/topolik/liferay-portal","description":"","fork":true,"url":"https://api.github.com/repos/topolik/liferay-portal","forks_url":"https://api.github.com/repos/topolik/liferay-portal/forks","keys_url":"https://api.github.com/repos/topolik/liferay-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/topolik/liferay-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/topolik/liferay-portal/teams","hooks_url":"https://api.github.com/repos/topolik/liferay-portal/hooks","issue_events_url":"https://api.github.com/repos/topolik/liferay-portal/issues/events{/number}","events_url":"https://api.github.com/repos/topolik/liferay-portal/events","assignees_url":"https://api.github.com/repos/topolik/liferay-portal/assignees{/user}","branches_url":"https://api.github.com/repos/topolik/liferay-portal/branches{/branch}","tags_url":"https://api.github.com/repos/topolik/liferay-portal/tags","blobs_url":"https://api.github.com/repos/topolik/liferay-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/topolik/liferay-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/topolik/liferay-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/topolik/liferay-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/topolik/liferay-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/topolik/liferay-portal/languages","stargazers_url":"https://api.github.com/repos/topolik/liferay-portal/stargazers","contributors_url":"https://api.github.com/repos/topolik/liferay-portal/contributors","subscribers_url":"https://api.github.com/repos/topolik/liferay-portal/subscribers","subscription_url":"https://api.github.com/repos/topolik/liferay-portal/subscription","commits_url":"https://api.github.com/repos/topolik/liferay-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/topolik/liferay-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/topolik/liferay-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/topolik/liferay-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/topolik/liferay-portal/contents/{+path}","compare_url":"https://api.github.com/repos/topolik/liferay-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/topolik/liferay-portal/merges","archive_url":"https://api.github.com/repos/topolik/liferay-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/topolik/liferay-portal/downloads","issues_url":"https://api.github.com/repos/topolik/liferay-portal/issues{/number}","pulls_url":"https://api.github.com/repos/topolik/liferay-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/topolik/liferay-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/topolik/liferay-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/topolik/liferay-portal/labels{/name}","releases_url":"https://api.github.com/repos/topolik/liferay-portal/releases{/id}","deployments_url":"https://api.github.com/repos/topolik/liferay-portal/deployments","created_at":"2012-03-28T09:17:44Z","updated_at":"2015-05-30T15:49:29Z","pushed_at":"2016-02-10T11:59:54Z","git_url":"git://github.com/topolik/liferay-portal.git","ssh_url":"git@github.com:topolik/liferay-portal.git","clone_url":"https://github.com/topolik/liferay-portal.git","svn_url":"https://github.com/topolik/liferay-portal","homepage":"http://liferay.com","size":5607418,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":2,"default_branch":"master"}},"base":{"label":"brianchandotcom:master","ref":"master","sha":"cc5c84c8408425ff296579cb236ee56efa3b3439","user":{"login":"brianchandotcom","id":282080,"avatar_url":"https://avatars.githubusercontent.com/u/282080?v=3","gravatar_id":"","url":"https://api.github.com/users/brianchandotcom","html_url":"https://github.com/brianchandotcom","followers_url":"https://api.github.com/users/brianchandotcom/followers","following_url":"https://api.github.com/users/brianchandotcom/following{/other_user}","gists_url":"https://api.github.com/users/brianchandotcom/gists{/gist_id}","starred_url":"https://api.github.com/users/brianchandotcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianchandotcom/subscriptions","organizations_url":"https://api.github.com/users/brianchandotcom/orgs","repos_url":"https://api.github.com/users/brianchandotcom/repos","events_url":"https://api.github.com/users/brianchandotcom/events{/privacy}","received_events_url":"https://api.github.com/users/brianchandotcom/received_events","type":"User","site_admin":false},"repo":{"id":1920851,"name":"liferay-portal","full_name":"brianchandotcom/liferay-portal","owner":{"login":"brianchandotcom","id":282080,"avatar_url":"https://avatars.githubusercontent.com/u/282080?v=3","gravatar_id":"","url":"https://api.github.com/users/brianchandotcom","html_url":"https://github.com/brianchandotcom","followers_url":"https://api.github.com/users/brianchandotcom/followers","following_url":"https://api.github.com/users/brianchandotcom/following{/other_user}","gists_url":"https://api.github.com/users/brianchandotcom/gists{/gist_id}","starred_url":"https://api.github.com/users/brianchandotcom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianchandotcom/subscriptions","organizations_url":"https://api.github.com/users/brianchandotcom/orgs","repos_url":"https://api.github.com/users/brianchandotcom/repos","events_url":"https://api.github.com/users/brianchandotcom/events{/privacy}","received_events_url":"https://api.github.com/users/brianchandotcom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/brianchandotcom/liferay-portal","description":"","fork":true,"url":"https://api.github.com/repos/brianchandotcom/liferay-portal","forks_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/forks","keys_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/teams","hooks_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/hooks","issue_events_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/issues/events{/number}","events_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/events","assignees_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/assignees{/user}","branches_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/branches{/branch}","tags_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/tags","blobs_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/languages","stargazers_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/stargazers","contributors_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/contributors","subscribers_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/subscribers","subscription_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/subscription","commits_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/contents/{+path}","compare_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/merges","archive_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/downloads","issues_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/issues{/number}","pulls_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/labels{/name}","releases_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/releases{/id}","deployments_url":"https://api.github.com/repos/brianchandotcom/liferay-portal/deployments","created_at":"2011-06-19T21:37:56Z","updated_at":"2016-01-28T18:09:18Z","pushed_at":"2016-02-10T22:35:01Z","git_url":"git://github.com/brianchandotcom/liferay-portal.git","ssh_url":"git@github.com:brianchandotcom/liferay-portal.git","clone_url":"https://github.com/brianchandotcom/liferay-portal.git","svn_url":"https://github.com/brianchandotcom/liferay-portal","homepage":"http://liferay.com","size":6370270,"stargazers_count":30,"watchers_count":30,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":10,"mirror_url":null,"open_issues_count":12,"forks":10,"open_issues":12,"watchers":30,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/brianchandotcom/liferay-portal/pulls/35858"},"html":{"href":"https://github.com/brianchandotcom/liferay-portal/pull/35858"},"issue":{"href":"https://api.github.com/repos/brianchandotcom/liferay-portal/issues/35858"},"comments":{"href":"https://api.github.com/repos/brianchandotcom/liferay-portal/issues/35858/comments"},"review_comments":{"href":"https://api.github.com/repos/brianchandotcom/liferay-portal/pulls/35858/comments"},"review_comment":{"href":"https://api.github.com/repos/brianchandotcom/liferay-portal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/brianchandotcom/liferay-portal/pulls/35858/commits"},"statuses":{"href":"https://api.github.com/repos/brianchandotcom/liferay-portal/statuses/9e5fa723f9f7af9802dd3a8a4b52ce91f79013ef"}},"merged":false,"mergeable":true,"mergeable_state":"unstable","merged_by":null,"comments":2,"review_comments":0,"commits":4,"additions":188,"deletions":9,"changed_files":3}}