{"action":"closed","number":5007,"pull_request":{"url":"https://api.github.com/repos/4teamwork/opengever.core/pulls/5007","id":226069631,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI2MDY5NjMx","html_url":"https://github.com/4teamwork/opengever.core/pull/5007","diff_url":"https://github.com/4teamwork/opengever.core/pull/5007.diff","patch_url":"https://github.com/4teamwork/opengever.core/pull/5007.patch","issue_url":"https://api.github.com/repos/4teamwork/opengever.core/issues/5007","number":5007,"state":"closed","locked":false,"title":"Restrict TaskQueries according to the task principals.","user":{"login":"phgross","id":485755,"node_id":"MDQ6VXNlcjQ4NTc1NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/485755?v=4","gravatar_id":"","url":"https://api.github.com/users/phgross","html_url":"https://github.com/phgross","followers_url":"https://api.github.com/users/phgross/followers","following_url":"https://api.github.com/users/phgross/following{/other_user}","gists_url":"https://api.github.com/users/phgross/gists{/gist_id}","starred_url":"https://api.github.com/users/phgross/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phgross/subscriptions","organizations_url":"https://api.github.com/users/phgross/orgs","repos_url":"https://api.github.com/users/phgross/repos","events_url":"https://api.github.com/users/phgross/events{/privacy}","received_events_url":"https://api.github.com/users/phgross/received_events","type":"User","site_admin":false},"body":"With the `TaskPrincipals` we already sync principals allowed to see a Task in to the globalindex. But currently the task queries has not been restricted and therefore a task was always visible, for all accessors of a Dossier and for inbox-users all tasks of a current admin_unit has been visible.\r\n\r\nWith \"OGIP 46 - personal task\", we now introduced a possibility to disable the `inbox-user` agency permission and have to restrict the task listings etc. I decided to restrict all TaskQueries, which also solves an [Issue](https://extranet.4teamwork.ch/support/gever-st-gallen/tracker/365) wich allowed including tasks in to pdf_task_listing, where the user was not allowed to access.\r\n\r\nDuring implementation I've also realized that the current implementation of the principals getter was wrong and did not respect the block_local_roles flag. \r\n\r\nMaybe backported to `2018.4-stable` \r\n\r\nCloses #4765 ","created_at":"2018-10-26T11:45:37Z","updated_at":"2018-11-01T12:34:31Z","closed_at":"2018-11-01T12:34:31Z","merged_at":"2018-11-01T12:34:31Z","merge_commit_sha":"6ffe7e69738f993857339ea802155c0b2dae57dc","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/4teamwork/opengever.core/milestones/48","html_url":"https://github.com/4teamwork/opengever.core/milestone/48","labels_url":"https://api.github.com/repos/4teamwork/opengever.core/milestones/48/labels","id":3205949,"node_id":"MDk6TWlsZXN0b25lMzIwNTk0OQ==","number":48,"title":"Release 2018.5","description":"","creator":{"login":"deiferni","id":736583,"node_id":"MDQ6VXNlcjczNjU4Mw==","avatar_url":"https://avatars2.githubusercontent.com/u/736583?v=4","gravatar_id":"","url":"https://api.github.com/users/deiferni","html_url":"https://github.com/deiferni","followers_url":"https://api.github.com/users/deiferni/followers","following_url":"https://api.github.com/users/deiferni/following{/other_user}","gists_url":"https://api.github.com/users/deiferni/gists{/gist_id}","starred_url":"https://api.github.com/users/deiferni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deiferni/subscriptions","organizations_url":"https://api.github.com/users/deiferni/orgs","repos_url":"https://api.github.com/users/deiferni/repos","events_url":"https://api.github.com/users/deiferni/events{/privacy}","received_events_url":"https://api.github.com/users/deiferni/received_events","type":"User","site_admin":false},"open_issues":24,"closed_issues":196,"state":"open","created_at":"2018-03-21T10:54:53Z","updated_at":"2018-11-01T12:34:31Z","due_on":"2018-10-29T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/4teamwork/opengever.core/pulls/5007/commits","review_comments_url":"https://api.github.com/repos/4teamwork/opengever.core/pulls/5007/comments","review_comment_url":"https://api.github.com/repos/4teamwork/opengever.core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/4teamwork/opengever.core/issues/5007/comments","statuses_url":"https://api.github.com/repos/4teamwork/opengever.core/statuses/0c927df6c508598a65046c496a8fc3743fe21afb","head":{"label":"4teamwork:pg_globalindex_task_protection","ref":"pg_globalindex_task_protection","sha":"0c927df6c508598a65046c496a8fc3743fe21afb","user":{"login":"4teamwork","id":681821,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4MTgyMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/681821?v=4","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"repo":{"id":9788097,"node_id":"MDEwOlJlcG9zaXRvcnk5Nzg4MDk3","name":"opengever.core","full_name":"4teamwork/opengever.core","private":false,"owner":{"login":"4teamwork","id":681821,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4MTgyMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/681821?v=4","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/4teamwork/opengever.core","description":"OneGov GEVER core package","fork":false,"url":"https://api.github.com/repos/4teamwork/opengever.core","forks_url":"https://api.github.com/repos/4teamwork/opengever.core/forks","keys_url":"https://api.github.com/repos/4teamwork/opengever.core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4teamwork/opengever.core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4teamwork/opengever.core/teams","hooks_url":"https://api.github.com/repos/4teamwork/opengever.core/hooks","issue_events_url":"https://api.github.com/repos/4teamwork/opengever.core/issues/events{/number}","events_url":"https://api.github.com/repos/4teamwork/opengever.core/events","assignees_url":"https://api.github.com/repos/4teamwork/opengever.core/assignees{/user}","branches_url":"https://api.github.com/repos/4teamwork/opengever.core/branches{/branch}","tags_url":"https://api.github.com/repos/4teamwork/opengever.core/tags","blobs_url":"https://api.github.com/repos/4teamwork/opengever.core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4teamwork/opengever.core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4teamwork/opengever.core/git/refs{/sha}","trees_url":"https://api.github.com/repos/4teamwork/opengever.core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4teamwork/opengever.core/statuses/{sha}","languages_url":"https://api.github.com/repos/4teamwork/opengever.core/languages","stargazers_url":"https://api.github.com/repos/4teamwork/opengever.core/stargazers","contributors_url":"https://api.github.com/repos/4teamwork/opengever.core/contributors","subscribers_url":"https://api.github.com/repos/4teamwork/opengever.core/subscribers","subscription_url":"https://api.github.com/repos/4teamwork/opengever.core/subscription","commits_url":"https://api.github.com/repos/4teamwork/opengever.core/commits{/sha}","git_commits_url":"https://api.github.com/repos/4teamwork/opengever.core/git/commits{/sha}","comments_url":"https://api.github.com/repos/4teamwork/opengever.core/comments{/number}","issue_comment_url":"https://api.github.com/repos/4teamwork/opengever.core/issues/comments{/number}","contents_url":"https://api.github.com/repos/4teamwork/opengever.core/contents/{+path}","compare_url":"https://api.github.com/repos/4teamwork/opengever.core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4teamwork/opengever.core/merges","archive_url":"https://api.github.com/repos/4teamwork/opengever.core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4teamwork/opengever.core/downloads","issues_url":"https://api.github.com/repos/4teamwork/opengever.core/issues{/number}","pulls_url":"https://api.github.com/repos/4teamwork/opengever.core/pulls{/number}","milestones_url":"https://api.github.com/repos/4teamwork/opengever.core/milestones{/number}","notifications_url":"https://api.github.com/repos/4teamwork/opengever.core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4teamwork/opengever.core/labels{/name}","releases_url":"https://api.github.com/repos/4teamwork/opengever.core/releases{/id}","deployments_url":"https://api.github.com/repos/4teamwork/opengever.core/deployments","created_at":"2013-05-01T08:28:16Z","updated_at":"2018-11-01T08:49:20Z","pushed_at":"2018-11-01T12:34:31Z","git_url":"git://github.com/4teamwork/opengever.core.git","ssh_url":"git@github.com:4teamwork/opengever.core.git","clone_url":"https://github.com/4teamwork/opengever.core.git","svn_url":"https://github.com/4teamwork/opengever.core","homepage":"","size":105273,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":203,"license":null,"forks":4,"open_issues":203,"watchers":5,"default_branch":"master"}},"base":{"label":"4teamwork:master","ref":"master","sha":"942a4588c2fbdb4a9681f22c963fb4b6d6371370","user":{"login":"4teamwork","id":681821,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4MTgyMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/681821?v=4","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"repo":{"id":9788097,"node_id":"MDEwOlJlcG9zaXRvcnk5Nzg4MDk3","name":"opengever.core","full_name":"4teamwork/opengever.core","private":false,"owner":{"login":"4teamwork","id":681821,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY4MTgyMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/681821?v=4","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/4teamwork/opengever.core","description":"OneGov GEVER core package","fork":false,"url":"https://api.github.com/repos/4teamwork/opengever.core","forks_url":"https://api.github.com/repos/4teamwork/opengever.core/forks","keys_url":"https://api.github.com/repos/4teamwork/opengever.core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4teamwork/opengever.core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4teamwork/opengever.core/teams","hooks_url":"https://api.github.com/repos/4teamwork/opengever.core/hooks","issue_events_url":"https://api.github.com/repos/4teamwork/opengever.core/issues/events{/number}","events_url":"https://api.github.com/repos/4teamwork/opengever.core/events","assignees_url":"https://api.github.com/repos/4teamwork/opengever.core/assignees{/user}","branches_url":"https://api.github.com/repos/4teamwork/opengever.core/branches{/branch}","tags_url":"https://api.github.com/repos/4teamwork/opengever.core/tags","blobs_url":"https://api.github.com/repos/4teamwork/opengever.core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4teamwork/opengever.core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4teamwork/opengever.core/git/refs{/sha}","trees_url":"https://api.github.com/repos/4teamwork/opengever.core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4teamwork/opengever.core/statuses/{sha}","languages_url":"https://api.github.com/repos/4teamwork/opengever.core/languages","stargazers_url":"https://api.github.com/repos/4teamwork/opengever.core/stargazers","contributors_url":"https://api.github.com/repos/4teamwork/opengever.core/contributors","subscribers_url":"https://api.github.com/repos/4teamwork/opengever.core/subscribers","subscription_url":"https://api.github.com/repos/4teamwork/opengever.core/subscription","commits_url":"https://api.github.com/repos/4teamwork/opengever.core/commits{/sha}","git_commits_url":"https://api.github.com/repos/4teamwork/opengever.core/git/commits{/sha}","comments_url":"https://api.github.com/repos/4teamwork/opengever.core/comments{/number}","issue_comment_url":"https://api.github.com/repos/4teamwork/opengever.core/issues/comments{/number}","contents_url":"https://api.github.com/repos/4teamwork/opengever.core/contents/{+path}","compare_url":"https://api.github.com/repos/4teamwork/opengever.core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4teamwork/opengever.core/merges","archive_url":"https://api.github.com/repos/4teamwork/opengever.core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4teamwork/opengever.core/downloads","issues_url":"https://api.github.com/repos/4teamwork/opengever.core/issues{/number}","pulls_url":"https://api.github.com/repos/4teamwork/opengever.core/pulls{/number}","milestones_url":"https://api.github.com/repos/4teamwork/opengever.core/milestones{/number}","notifications_url":"https://api.github.com/repos/4teamwork/opengever.core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4teamwork/opengever.core/labels{/name}","releases_url":"https://api.github.com/repos/4teamwork/opengever.core/releases{/id}","deployments_url":"https://api.github.com/repos/4teamwork/opengever.core/deployments","created_at":"2013-05-01T08:28:16Z","updated_at":"2018-11-01T08:49:20Z","pushed_at":"2018-11-01T12:34:31Z","git_url":"git://github.com/4teamwork/opengever.core.git","ssh_url":"git@github.com:4teamwork/opengever.core.git","clone_url":"https://github.com/4teamwork/opengever.core.git","svn_url":"https://github.com/4teamwork/opengever.core","homepage":"","size":105273,"stargazers_count":5,"watchers_count":5,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":203,"license":null,"forks":4,"open_issues":203,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/4teamwork/opengever.core/pulls/5007"},"html":{"href":"https://github.com/4teamwork/opengever.core/pull/5007"},"issue":{"href":"https://api.github.com/repos/4teamwork/opengever.core/issues/5007"},"comments":{"href":"https://api.github.com/repos/4teamwork/opengever.core/issues/5007/comments"},"review_comments":{"href":"https://api.github.com/repos/4teamwork/opengever.core/pulls/5007/comments"},"review_comment":{"href":"https://api.github.com/repos/4teamwork/opengever.core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/4teamwork/opengever.core/pulls/5007/commits"},"statuses":{"href":"https://api.github.com/repos/4teamwork/opengever.core/statuses/0c927df6c508598a65046c496a8fc3743fe21afb"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"lukasgraf","id":405124,"node_id":"MDQ6VXNlcjQwNTEyNA==","avatar_url":"https://avatars2.githubusercontent.com/u/405124?v=4","gravatar_id":"","url":"https://api.github.com/users/lukasgraf","html_url":"https://github.com/lukasgraf","followers_url":"https://api.github.com/users/lukasgraf/followers","following_url":"https://api.github.com/users/lukasgraf/following{/other_user}","gists_url":"https://api.github.com/users/lukasgraf/gists{/gist_id}","starred_url":"https://api.github.com/users/lukasgraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukasgraf/subscriptions","organizations_url":"https://api.github.com/users/lukasgraf/orgs","repos_url":"https://api.github.com/users/lukasgraf/repos","events_url":"https://api.github.com/users/lukasgraf/events{/privacy}","received_events_url":"https://api.github.com/users/lukasgraf/received_events","type":"User","site_admin":false},"comments":2,"review_comments":11,"maintainer_can_modify":false,"commits":6,"additions":209,"deletions":194,"changed_files":9}}
{"actor":{"display_login":"lukasgraf"}}