theforeman/foreman — pull request #2013 by nbarrientos (2014-12-12 14:18:57+00:00)
Title: Pass model type so search_for is called on Host

At least on version 1.6.1, the absence of this second parameter leads to a
runtime crash when it's time to validate if the current user (non-admin) is
allowed to perform a power operation on given a host via the APIv2.

The root cause of the crash is basically that search_for is called on
Host::Base by app/services/authorizer.rb:50.

Not sure this is necessary in newer versions, up to the developers to figure
it out :)