{"action":"created","comment":{"url":"https://api.github.com/repos/phpbb/phpbb/pulls/comments/29106678","id":29106678,"diff_hunk":"@@ -429,9 +429,23 @@ public function permission_set($name, $auth_option, $type = 'role', $has_permiss\n \t\t\t\t\t\tFROM ' . ACL_ROLES_TABLE . '\n \t\t\t\t\t\tWHERE role_id = ' . $role_id;\n \t\t\t\t\t$this->db->sql_query($sql);\n-\t\t\t\t\t$role_name = $this->db->sql_fetchfield('role_name');\n-\n-\t\t\t\t\treturn $this->permission_set($role_name, $auth_option, 'role', $has_permission);\n+\t\t\t\t\t$role_data = $this->db->sql_fetchrow();\n+\t\t\t\t\t$role_name = $role_data['role_name'];\n+\t\t\t\t\t$role_type = $role_data['role_type'];","path":"phpBB/phpbb/db/migration/tool/permission.php","position":9,"original_position":9,"commit_id":"42ce09b5f5e0438861cc83be9f9fe5937bf251ba","original_commit_id":"42ce09b5f5e0438861cc83be9f9fe5937bf251ba","user":{"login":"VSEphpbb","id":303711,"avatar_url":"https://avatars.githubusercontent.com/u/303711?v=3","gravatar_id":"","url":"https://api.github.com/users/VSEphpbb","html_url":"https://github.com/VSEphpbb","followers_url":"https://api.github.com/users/VSEphpbb/followers","following_url":"https://api.github.com/users/VSEphpbb/following{/other_user}","gists_url":"https://api.github.com/users/VSEphpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/VSEphpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VSEphpbb/subscriptions","organizations_url":"https://api.github.com/users/VSEphpbb/orgs","repos_url":"https://api.github.com/users/VSEphpbb/repos","events_url":"https://api.github.com/users/VSEphpbb/events{/privacy}","received_events_url":"https://api.github.com/users/VSEphpbb/received_events","type":"User","site_admin":false},"body":"role_type is not retrieved in the query","created_at":"2015-04-26T04:39:09Z","updated_at":"2015-04-26T04:39:09Z","html_url":"https://github.com/phpbb/phpbb/pull/3551#discussion_r29106678","pull_request_url":"https://api.github.com/repos/phpbb/phpbb/pulls/3551","_links":{"self":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/comments/29106678"},"html":{"href":"https://github.com/phpbb/phpbb/pull/3551#discussion_r29106678"},"pull_request":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/3551"}}},"pull_request":{"url":"https://api.github.com/repos/phpbb/phpbb/pulls/3551","id":34117433,"html_url":"https://github.com/phpbb/phpbb/pull/3551","diff_url":"https://github.com/phpbb/phpbb/pull/3551.diff","patch_url":"https://github.com/phpbb/phpbb/pull/3551.patch","issue_url":"https://api.github.com/repos/phpbb/phpbb/issues/3551","number":3551,"state":"open","locked":false,"title":"[ticket/13779] Set new auth options to the role only if matching the role type","user":{"login":"rxu","id":212322,"avatar_url":"https://avatars.githubusercontent.com/u/212322?v=3","gravatar_id":"","url":"https://api.github.com/users/rxu","html_url":"https://github.com/rxu","followers_url":"https://api.github.com/users/rxu/followers","following_url":"https://api.github.com/users/rxu/following{/other_user}","gists_url":"https://api.github.com/users/rxu/gists{/gist_id}","starred_url":"https://api.github.com/users/rxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxu/subscriptions","organizations_url":"https://api.github.com/users/rxu/orgs","repos_url":"https://api.github.com/users/rxu/repos","events_url":"https://api.github.com/users/rxu/events{/privacy}","received_events_url":"https://api.github.com/users/rxu/received_events","type":"User","site_admin":false},"body":"Migrations' permission tool allows setting permissions to the role which\r\ndoesn't match the role type, e.g. m_ permissions for u_ role types and so on.\r\nAs one of side effects, this may lead to granting users moderative/admin\r\npermissions silently.\r\nWith this patch the only new permissions matching the role type will be set.\r\n\r\n<a href=\"https://tracker.phpbb.com/browse/PHPBB3-13779\">PHPBB3-13779</a>.","created_at":"2015-04-26T03:52:17Z","updated_at":"2015-04-26T04:39:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26ea4ff9d46bfaf1340e4ebeeda290eae1f40f97","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/phpbb/phpbb/pulls/3551/commits","review_comments_url":"https://api.github.com/repos/phpbb/phpbb/pulls/3551/comments","review_comment_url":"https://api.github.com/repos/phpbb/phpbb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/phpbb/phpbb/issues/3551/comments","statuses_url":"https://api.github.com/repos/phpbb/phpbb/statuses/42ce09b5f5e0438861cc83be9f9fe5937bf251ba","head":{"label":"rxu:ticket/13779","ref":"ticket/13779","sha":"42ce09b5f5e0438861cc83be9f9fe5937bf251ba","user":{"login":"rxu","id":212322,"avatar_url":"https://avatars.githubusercontent.com/u/212322?v=3","gravatar_id":"","url":"https://api.github.com/users/rxu","html_url":"https://github.com/rxu","followers_url":"https://api.github.com/users/rxu/followers","following_url":"https://api.github.com/users/rxu/following{/other_user}","gists_url":"https://api.github.com/users/rxu/gists{/gist_id}","starred_url":"https://api.github.com/users/rxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxu/subscriptions","organizations_url":"https://api.github.com/users/rxu/orgs","repos_url":"https://api.github.com/users/rxu/repos","events_url":"https://api.github.com/users/rxu/events{/privacy}","received_events_url":"https://api.github.com/users/rxu/received_events","type":"User","site_admin":false},"repo":{"id":557908,"name":"phpbb3","full_name":"rxu/phpbb3","owner":{"login":"rxu","id":212322,"avatar_url":"https://avatars.githubusercontent.com/u/212322?v=3","gravatar_id":"","url":"https://api.github.com/users/rxu","html_url":"https://github.com/rxu","followers_url":"https://api.github.com/users/rxu/followers","following_url":"https://api.github.com/users/rxu/following{/other_user}","gists_url":"https://api.github.com/users/rxu/gists{/gist_id}","starred_url":"https://api.github.com/users/rxu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rxu/subscriptions","organizations_url":"https://api.github.com/users/rxu/orgs","repos_url":"https://api.github.com/users/rxu/repos","events_url":"https://api.github.com/users/rxu/events{/privacy}","received_events_url":"https://api.github.com/users/rxu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rxu/phpbb3","description":" phpBB 3 Development: phpBB is a popular open-source bulletin board written in PHP. This repository also contains the history of version 2.","fork":true,"url":"https://api.github.com/repos/rxu/phpbb3","forks_url":"https://api.github.com/repos/rxu/phpbb3/forks","keys_url":"https://api.github.com/repos/rxu/phpbb3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rxu/phpbb3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rxu/phpbb3/teams","hooks_url":"https://api.github.com/repos/rxu/phpbb3/hooks","issue_events_url":"https://api.github.com/repos/rxu/phpbb3/issues/events{/number}","events_url":"https://api.github.com/repos/rxu/phpbb3/events","assignees_url":"https://api.github.com/repos/rxu/phpbb3/assignees{/user}","branches_url":"https://api.github.com/repos/rxu/phpbb3/branches{/branch}","tags_url":"https://api.github.com/repos/rxu/phpbb3/tags","blobs_url":"https://api.github.com/repos/rxu/phpbb3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rxu/phpbb3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rxu/phpbb3/git/refs{/sha}","trees_url":"https://api.github.com/repos/rxu/phpbb3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rxu/phpbb3/statuses/{sha}","languages_url":"https://api.github.com/repos/rxu/phpbb3/languages","stargazers_url":"https://api.github.com/repos/rxu/phpbb3/stargazers","contributors_url":"https://api.github.com/repos/rxu/phpbb3/contributors","subscribers_url":"https://api.github.com/repos/rxu/phpbb3/subscribers","subscription_url":"https://api.github.com/repos/rxu/phpbb3/subscription","commits_url":"https://api.github.com/repos/rxu/phpbb3/commits{/sha}","git_commits_url":"https://api.github.com/repos/rxu/phpbb3/git/commits{/sha}","comments_url":"https://api.github.com/repos/rxu/phpbb3/comments{/number}","issue_comment_url":"https://api.github.com/repos/rxu/phpbb3/issues/comments{/number}","contents_url":"https://api.github.com/repos/rxu/phpbb3/contents/{+path}","compare_url":"https://api.github.com/repos/rxu/phpbb3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rxu/phpbb3/merges","archive_url":"https://api.github.com/repos/rxu/phpbb3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rxu/phpbb3/downloads","issues_url":"https://api.github.com/repos/rxu/phpbb3/issues{/number}","pulls_url":"https://api.github.com/repos/rxu/phpbb3/pulls{/number}","milestones_url":"https://api.github.com/repos/rxu/phpbb3/milestones{/number}","notifications_url":"https://api.github.com/repos/rxu/phpbb3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rxu/phpbb3/labels{/name}","releases_url":"https://api.github.com/repos/rxu/phpbb3/releases{/id}","created_at":"2010-03-11T17:39:26Z","updated_at":"2015-04-06T10:15:46Z","pushed_at":"2015-04-26T04:31:47Z","git_url":"git://github.com/rxu/phpbb3.git","ssh_url":"git@github.com:rxu/phpbb3.git","clone_url":"https://github.com/rxu/phpbb3.git","svn_url":"https://github.com/rxu/phpbb3","homepage":"http://www.phpbb.com","size":54086,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":3,"default_branch":"develop-ascraeus"}},"base":{"label":"phpbb:3.1.x","ref":"3.1.x","sha":"887f83589ff34dc087b75f3f2dfa9f1da73c8dea","user":{"login":"phpbb","id":176697,"avatar_url":"https://avatars.githubusercontent.com/u/176697?v=3","gravatar_id":"","url":"https://api.github.com/users/phpbb","html_url":"https://github.com/phpbb","followers_url":"https://api.github.com/users/phpbb/followers","following_url":"https://api.github.com/users/phpbb/following{/other_user}","gists_url":"https://api.github.com/users/phpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/phpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpbb/subscriptions","organizations_url":"https://api.github.com/users/phpbb/orgs","repos_url":"https://api.github.com/users/phpbb/repos","events_url":"https://api.github.com/users/phpbb/events{/privacy}","received_events_url":"https://api.github.com/users/phpbb/received_events","type":"Organization","site_admin":false},"repo":{"id":541983,"name":"phpbb","full_name":"phpbb/phpbb","owner":{"login":"phpbb","id":176697,"avatar_url":"https://avatars.githubusercontent.com/u/176697?v=3","gravatar_id":"","url":"https://api.github.com/users/phpbb","html_url":"https://github.com/phpbb","followers_url":"https://api.github.com/users/phpbb/followers","following_url":"https://api.github.com/users/phpbb/following{/other_user}","gists_url":"https://api.github.com/users/phpbb/gists{/gist_id}","starred_url":"https://api.github.com/users/phpbb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpbb/subscriptions","organizations_url":"https://api.github.com/users/phpbb/orgs","repos_url":"https://api.github.com/users/phpbb/repos","events_url":"https://api.github.com/users/phpbb/events{/privacy}","received_events_url":"https://api.github.com/users/phpbb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/phpbb/phpbb","description":" phpBB 3 Development: phpBB is a popular open-source bulletin board written in PHP. This repository also contains the history of version 2.","fork":false,"url":"https://api.github.com/repos/phpbb/phpbb","forks_url":"https://api.github.com/repos/phpbb/phpbb/forks","keys_url":"https://api.github.com/repos/phpbb/phpbb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phpbb/phpbb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phpbb/phpbb/teams","hooks_url":"https://api.github.com/repos/phpbb/phpbb/hooks","issue_events_url":"https://api.github.com/repos/phpbb/phpbb/issues/events{/number}","events_url":"https://api.github.com/repos/phpbb/phpbb/events","assignees_url":"https://api.github.com/repos/phpbb/phpbb/assignees{/user}","branches_url":"https://api.github.com/repos/phpbb/phpbb/branches{/branch}","tags_url":"https://api.github.com/repos/phpbb/phpbb/tags","blobs_url":"https://api.github.com/repos/phpbb/phpbb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phpbb/phpbb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phpbb/phpbb/git/refs{/sha}","trees_url":"https://api.github.com/repos/phpbb/phpbb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phpbb/phpbb/statuses/{sha}","languages_url":"https://api.github.com/repos/phpbb/phpbb/languages","stargazers_url":"https://api.github.com/repos/phpbb/phpbb/stargazers","contributors_url":"https://api.github.com/repos/phpbb/phpbb/contributors","subscribers_url":"https://api.github.com/repos/phpbb/phpbb/subscribers","subscription_url":"https://api.github.com/repos/phpbb/phpbb/subscription","commits_url":"https://api.github.com/repos/phpbb/phpbb/commits{/sha}","git_commits_url":"https://api.github.com/repos/phpbb/phpbb/git/commits{/sha}","comments_url":"https://api.github.com/repos/phpbb/phpbb/comments{/number}","issue_comment_url":"https://api.github.com/repos/phpbb/phpbb/issues/comments{/number}","contents_url":"https://api.github.com/repos/phpbb/phpbb/contents/{+path}","compare_url":"https://api.github.com/repos/phpbb/phpbb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phpbb/phpbb/merges","archive_url":"https://api.github.com/repos/phpbb/phpbb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phpbb/phpbb/downloads","issues_url":"https://api.github.com/repos/phpbb/phpbb/issues{/number}","pulls_url":"https://api.github.com/repos/phpbb/phpbb/pulls{/number}","milestones_url":"https://api.github.com/repos/phpbb/phpbb/milestones{/number}","notifications_url":"https://api.github.com/repos/phpbb/phpbb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phpbb/phpbb/labels{/name}","releases_url":"https://api.github.com/repos/phpbb/phpbb/releases{/id}","created_at":"2010-03-01T22:33:17Z","updated_at":"2015-04-25T16:20:09Z","pushed_at":"2015-04-26T04:31:48Z","git_url":"git://github.com/phpbb/phpbb.git","ssh_url":"git@github.com:phpbb/phpbb.git","clone_url":"https://github.com/phpbb/phpbb.git","svn_url":"https://github.com/phpbb/phpbb","homepage":"http://www.phpbb.com","size":126146,"stargazers_count":722,"watchers_count":722,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":452,"mirror_url":null,"open_issues_count":81,"forks":452,"open_issues":81,"watchers":722,"default_branch":"3.1.x"}},"_links":{"self":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/3551"},"html":{"href":"https://github.com/phpbb/phpbb/pull/3551"},"issue":{"href":"https://api.github.com/repos/phpbb/phpbb/issues/3551"},"comments":{"href":"https://api.github.com/repos/phpbb/phpbb/issues/3551/comments"},"review_comments":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/3551/comments"},"review_comment":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/phpbb/phpbb/pulls/3551/commits"},"statuses":{"href":"https://api.github.com/repos/phpbb/phpbb/statuses/42ce09b5f5e0438861cc83be9f9fe5937bf251ba"}}}}