{"action":"opened","number":1,"pull_request":{"url":"https://api.github.com/repos/iPublikuj/permissions/pulls/1","id":40682595,"html_url":"https://github.com/iPublikuj/permissions/pull/1","diff_url":"https://github.com/iPublikuj/permissions/pull/1.diff","patch_url":"https://github.com/iPublikuj/permissions/pull/1.patch","issue_url":"https://api.github.com/repos/iPublikuj/permissions/issues/1","number":1,"state":"open","locked":false,"title":"Permissions inheritance not working at all","user":{"login":"srigi","id":295197,"avatar_url":"https://avatars.githubusercontent.com/u/295197?v=3","gravatar_id":"","url":"https://api.github.com/users/srigi","html_url":"https://github.com/srigi","followers_url":"https://api.github.com/users/srigi/followers","following_url":"https://api.github.com/users/srigi/following{/other_user}","gists_url":"https://api.github.com/users/srigi/gists{/gist_id}","starred_url":"https://api.github.com/users/srigi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srigi/subscriptions","organizations_url":"https://api.github.com/users/srigi/orgs","repos_url":"https://api.github.com/users/srigi/repos","events_url":"https://api.github.com/users/srigi/events{/privacy}","received_events_url":"https://api.github.com/users/srigi/received_events","type":"User","site_admin":false},"body":"I'm sending you failing tests for permissions inheritance.\r\n\r\nYour `Permissions\\Entities\\Role` type has two methods: `setParent` and `setChildren`. Its obvious what this do - according role inherits permissions of another role. This is a must-have feature in ACL systems. In `IPub\\Permissions` this is not working at all.\r\n\r\nFixing `setParent` should be easy - at `IPub\\Permissions\\Security\\Permission::addPermission`  simply don't explicitly deny permission at line 139.\r\n\r\nFixing `setChildren` is tricky - you must correctly setup roles graph. I'm sending you this picture to illustrate what is by my opinion wrong.\r\n\r\n![screen shot 2015-07-23 at 16 57 29](https://cloud.githubusercontent.com/assets/295197/8853951/97119baa-315d-11e5-9a7d-56005c0d9109.png)\r\n\r\nAs you can see `user-defined-role` has correctly define children, but `user-defined-child-role` doesn't have defined parent.","created_at":"2015-07-23T15:10:41Z","updated_at":"2015-07-23T15:10:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/iPublikuj/permissions/pulls/1/commits","review_comments_url":"https://api.github.com/repos/iPublikuj/permissions/pulls/1/comments","review_comment_url":"https://api.github.com/repos/iPublikuj/permissions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/iPublikuj/permissions/issues/1/comments","statuses_url":"https://api.github.com/repos/iPublikuj/permissions/statuses/87314b747c33f06f0a0899b3ae86a10706b30b77","head":{"label":"srigi:issue/inheritance","ref":"issue/inheritance","sha":"87314b747c33f06f0a0899b3ae86a10706b30b77","user":{"login":"srigi","id":295197,"avatar_url":"https://avatars.githubusercontent.com/u/295197?v=3","gravatar_id":"","url":"https://api.github.com/users/srigi","html_url":"https://github.com/srigi","followers_url":"https://api.github.com/users/srigi/followers","following_url":"https://api.github.com/users/srigi/following{/other_user}","gists_url":"https://api.github.com/users/srigi/gists{/gist_id}","starred_url":"https://api.github.com/users/srigi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srigi/subscriptions","organizations_url":"https://api.github.com/users/srigi/orgs","repos_url":"https://api.github.com/users/srigi/repos","events_url":"https://api.github.com/users/srigi/events{/privacy}","received_events_url":"https://api.github.com/users/srigi/received_events","type":"User","site_admin":false},"repo":{"id":39570664,"name":"permissions","full_name":"srigi/permissions","owner":{"login":"srigi","id":295197,"avatar_url":"https://avatars.githubusercontent.com/u/295197?v=3","gravatar_id":"","url":"https://api.github.com/users/srigi","html_url":"https://github.com/srigi","followers_url":"https://api.github.com/users/srigi/followers","following_url":"https://api.github.com/users/srigi/following{/other_user}","gists_url":"https://api.github.com/users/srigi/gists{/gist_id}","starred_url":"https://api.github.com/users/srigi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srigi/subscriptions","organizations_url":"https://api.github.com/users/srigi/orgs","repos_url":"https://api.github.com/users/srigi/repos","events_url":"https://api.github.com/users/srigi/events{/privacy}","received_events_url":"https://api.github.com/users/srigi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/srigi/permissions","description":"Simple permission checker for Nette Framework","fork":true,"url":"https://api.github.com/repos/srigi/permissions","forks_url":"https://api.github.com/repos/srigi/permissions/forks","keys_url":"https://api.github.com/repos/srigi/permissions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/srigi/permissions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/srigi/permissions/teams","hooks_url":"https://api.github.com/repos/srigi/permissions/hooks","issue_events_url":"https://api.github.com/repos/srigi/permissions/issues/events{/number}","events_url":"https://api.github.com/repos/srigi/permissions/events","assignees_url":"https://api.github.com/repos/srigi/permissions/assignees{/user}","branches_url":"https://api.github.com/repos/srigi/permissions/branches{/branch}","tags_url":"https://api.github.com/repos/srigi/permissions/tags","blobs_url":"https://api.github.com/repos/srigi/permissions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/srigi/permissions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/srigi/permissions/git/refs{/sha}","trees_url":"https://api.github.com/repos/srigi/permissions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/srigi/permissions/statuses/{sha}","languages_url":"https://api.github.com/repos/srigi/permissions/languages","stargazers_url":"https://api.github.com/repos/srigi/permissions/stargazers","contributors_url":"https://api.github.com/repos/srigi/permissions/contributors","subscribers_url":"https://api.github.com/repos/srigi/permissions/subscribers","subscription_url":"https://api.github.com/repos/srigi/permissions/subscription","commits_url":"https://api.github.com/repos/srigi/permissions/commits{/sha}","git_commits_url":"https://api.github.com/repos/srigi/permissions/git/commits{/sha}","comments_url":"https://api.github.com/repos/srigi/permissions/comments{/number}","issue_comment_url":"https://api.github.com/repos/srigi/permissions/issues/comments{/number}","contents_url":"https://api.github.com/repos/srigi/permissions/contents/{+path}","compare_url":"https://api.github.com/repos/srigi/permissions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/srigi/permissions/merges","archive_url":"https://api.github.com/repos/srigi/permissions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/srigi/permissions/downloads","issues_url":"https://api.github.com/repos/srigi/permissions/issues{/number}","pulls_url":"https://api.github.com/repos/srigi/permissions/pulls{/number}","milestones_url":"https://api.github.com/repos/srigi/permissions/milestones{/number}","notifications_url":"https://api.github.com/repos/srigi/permissions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/srigi/permissions/labels{/name}","releases_url":"https://api.github.com/repos/srigi/permissions/releases{/id}","created_at":"2015-07-23T14:04:06Z","updated_at":"2015-07-23T14:04:06Z","pushed_at":"2015-07-23T15:02:20Z","git_url":"git://github.com/srigi/permissions.git","ssh_url":"git@github.com:srigi/permissions.git","clone_url":"https://github.com/srigi/permissions.git","svn_url":"https://github.com/srigi/permissions","homepage":"","size":109,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"iPublikuj:master","ref":"master","sha":"b311c3d9328f318e3b130c2be2c506d755444e83","user":{"login":"iPublikuj","id":7198079,"avatar_url":"https://avatars.githubusercontent.com/u/7198079?v=3","gravatar_id":"","url":"https://api.github.com/users/iPublikuj","html_url":"https://github.com/iPublikuj","followers_url":"https://api.github.com/users/iPublikuj/followers","following_url":"https://api.github.com/users/iPublikuj/following{/other_user}","gists_url":"https://api.github.com/users/iPublikuj/gists{/gist_id}","starred_url":"https://api.github.com/users/iPublikuj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iPublikuj/subscriptions","organizations_url":"https://api.github.com/users/iPublikuj/orgs","repos_url":"https://api.github.com/users/iPublikuj/repos","events_url":"https://api.github.com/users/iPublikuj/events{/privacy}","received_events_url":"https://api.github.com/users/iPublikuj/received_events","type":"Organization","site_admin":false},"repo":{"id":25225761,"name":"permissions","full_name":"iPublikuj/permissions","owner":{"login":"iPublikuj","id":7198079,"avatar_url":"https://avatars.githubusercontent.com/u/7198079?v=3","gravatar_id":"","url":"https://api.github.com/users/iPublikuj","html_url":"https://github.com/iPublikuj","followers_url":"https://api.github.com/users/iPublikuj/followers","following_url":"https://api.github.com/users/iPublikuj/following{/other_user}","gists_url":"https://api.github.com/users/iPublikuj/gists{/gist_id}","starred_url":"https://api.github.com/users/iPublikuj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iPublikuj/subscriptions","organizations_url":"https://api.github.com/users/iPublikuj/orgs","repos_url":"https://api.github.com/users/iPublikuj/repos","events_url":"https://api.github.com/users/iPublikuj/events{/privacy}","received_events_url":"https://api.github.com/users/iPublikuj/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/iPublikuj/permissions","description":"Simple permission checker for Nette Framework","fork":false,"url":"https://api.github.com/repos/iPublikuj/permissions","forks_url":"https://api.github.com/repos/iPublikuj/permissions/forks","keys_url":"https://api.github.com/repos/iPublikuj/permissions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/iPublikuj/permissions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/iPublikuj/permissions/teams","hooks_url":"https://api.github.com/repos/iPublikuj/permissions/hooks","issue_events_url":"https://api.github.com/repos/iPublikuj/permissions/issues/events{/number}","events_url":"https://api.github.com/repos/iPublikuj/permissions/events","assignees_url":"https://api.github.com/repos/iPublikuj/permissions/assignees{/user}","branches_url":"https://api.github.com/repos/iPublikuj/permissions/branches{/branch}","tags_url":"https://api.github.com/repos/iPublikuj/permissions/tags","blobs_url":"https://api.github.com/repos/iPublikuj/permissions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/iPublikuj/permissions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/iPublikuj/permissions/git/refs{/sha}","trees_url":"https://api.github.com/repos/iPublikuj/permissions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/iPublikuj/permissions/statuses/{sha}","languages_url":"https://api.github.com/repos/iPublikuj/permissions/languages","stargazers_url":"https://api.github.com/repos/iPublikuj/permissions/stargazers","contributors_url":"https://api.github.com/repos/iPublikuj/permissions/contributors","subscribers_url":"https://api.github.com/repos/iPublikuj/permissions/subscribers","subscription_url":"https://api.github.com/repos/iPublikuj/permissions/subscription","commits_url":"https://api.github.com/repos/iPublikuj/permissions/commits{/sha}","git_commits_url":"https://api.github.com/repos/iPublikuj/permissions/git/commits{/sha}","comments_url":"https://api.github.com/repos/iPublikuj/permissions/comments{/number}","issue_comment_url":"https://api.github.com/repos/iPublikuj/permissions/issues/comments{/number}","contents_url":"https://api.github.com/repos/iPublikuj/permissions/contents/{+path}","compare_url":"https://api.github.com/repos/iPublikuj/permissions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/iPublikuj/permissions/merges","archive_url":"https://api.github.com/repos/iPublikuj/permissions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/iPublikuj/permissions/downloads","issues_url":"https://api.github.com/repos/iPublikuj/permissions/issues{/number}","pulls_url":"https://api.github.com/repos/iPublikuj/permissions/pulls{/number}","milestones_url":"https://api.github.com/repos/iPublikuj/permissions/milestones{/number}","notifications_url":"https://api.github.com/repos/iPublikuj/permissions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/iPublikuj/permissions/labels{/name}","releases_url":"https://api.github.com/repos/iPublikuj/permissions/releases{/id}","created_at":"2014-10-14T20:43:50Z","updated_at":"2015-06-03T21:03:35Z","pushed_at":"2015-06-08T20:39:22Z","git_url":"git://github.com/iPublikuj/permissions.git","ssh_url":"git@github.com:iPublikuj/permissions.git","clone_url":"https://github.com/iPublikuj/permissions.git","svn_url":"https://github.com/iPublikuj/permissions","homepage":"","size":260,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/iPublikuj/permissions/pulls/1"},"html":{"href":"https://github.com/iPublikuj/permissions/pull/1"},"issue":{"href":"https://api.github.com/repos/iPublikuj/permissions/issues/1"},"comments":{"href":"https://api.github.com/repos/iPublikuj/permissions/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/iPublikuj/permissions/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/iPublikuj/permissions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/iPublikuj/permissions/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/iPublikuj/permissions/statuses/87314b747c33f06f0a0899b3ae86a10706b30b77"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":125,"deletions":2,"changed_files":2}}