{"action":"created","issue":{"url":"https://api.github.com/repos/theforeman/foreman/issues/2121","labels_url":"https://api.github.com/repos/theforeman/foreman/issues/2121/labels{/name}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/2121/comments","events_url":"https://api.github.com/repos/theforeman/foreman/issues/2121/events","html_url":"https://github.com/theforeman/foreman/pull/2121","id":56247280,"number":2121,"title":"Fix #8812 - Pass model type so search_for is called on Host","user":{"login":"roidelapluie","id":291750,"avatar_url":"https://avatars.githubusercontent.com/u/291750?v=3","gravatar_id":"","url":"https://api.github.com/users/roidelapluie","html_url":"https://github.com/roidelapluie","followers_url":"https://api.github.com/users/roidelapluie/followers","following_url":"https://api.github.com/users/roidelapluie/following{/other_user}","gists_url":"https://api.github.com/users/roidelapluie/gists{/gist_id}","starred_url":"https://api.github.com/users/roidelapluie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/roidelapluie/subscriptions","organizations_url":"https://api.github.com/users/roidelapluie/orgs","repos_url":"https://api.github.com/users/roidelapluie/repos","events_url":"https://api.github.com/users/roidelapluie/events{/privacy}","received_events_url":"https://api.github.com/users/roidelapluie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/theforeman/foreman/labels/1.8.0%20priority","name":"1.8.0 priority","color":"d4c5f9"},{"url":"https://api.github.com/repos/theforeman/foreman/labels/Needs%20re-review","name":"Needs re-review","color":"0052cc"},{"url":"https://api.github.com/repos/theforeman/foreman/labels/Needs%20testing","name":"Needs testing","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-02-02T15:06:12Z","updated_at":"2015-04-07T12:09:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/2121","html_url":"https://github.com/theforeman/foreman/pull/2121","diff_url":"https://github.com/theforeman/foreman/pull/2121.diff","patch_url":"https://github.com/theforeman/foreman/pull/2121.patch"},"body":"This PR is a rebase of GH-2013\r\n\r\nAt least on version 1.6.1, the absence of this second parameter leads to a\r\nruntime crash when it's time to validate if the current user (non-admin) is\r\nallowed to perform a power operation on given a host via the APIv2.\r\n\r\nThe root cause of the crash is basically that search_for is called on\r\nHost::Base by app/services/authorizer.rb:50.\r\n\r\nNot sure this is necessary in newer versions, up to the developers to figure\r\nit out :)"},"comment":{"url":"https://api.github.com/repos/theforeman/foreman/issues/comments/90529943","html_url":"https://github.com/theforeman/foreman/pull/2121#issuecomment-90529943","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/2121","id":90529943,"user":{"login":"theforeman-bot","id":3763234,"avatar_url":"https://avatars.githubusercontent.com/u/3763234?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman-bot","html_url":"https://github.com/theforeman-bot","followers_url":"https://api.github.com/users/theforeman-bot/followers","following_url":"https://api.github.com/users/theforeman-bot/following{/other_user}","gists_url":"https://api.github.com/users/theforeman-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman-bot/subscriptions","organizations_url":"https://api.github.com/users/theforeman-bot/orgs","repos_url":"https://api.github.com/users/theforeman-bot/repos","events_url":"https://api.github.com/users/theforeman-bot/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman-bot/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T12:09:05Z","updated_at":"2015-04-07T12:09:05Z","body":"There were the following issues with the commit message:\n  * 948ab7a593814585d8b2b24f96b8361132580318 must be in the format ```Fixes/refs #redmine_number - brief description```.\n\n\nGuidelines are available on [the Foreman wiki](http://projects.theforeman.org/projects/foreman/wiki/Reviewing_patches-commit_message_format).\n\n---------------------------------------\nThis message was auto-generated by Foreman's [prprocessor](http://github.com/theforeman/prprocessor)\n"}}