Actions
Bug #15236
closedNo permissions for power, puppetrun e.t.c in API
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1341149
Description of problem:
Host's special actions will fail with "Unknown permission" exception
Example:
[root@xyz ~]# curl --insecure -X PUT -d '{"power_action": "state"}' -u admin:changeme -H "Content-Type:application/json" -H "Accept:application/json" https://abc.redhat.com/api/v2/hosts/abc1.redhat.com/power
{
"error": {"message":"ERF42-5531 [Foreman::Exception]: unknown permission for api/v2/hosts#power"}
}
Additional info:
Katello is redefining #action_permission method in katello/app/controllers/katello/concerns/api/v2/hosts_controller_extensions.rb which means that the original host's method is not called.
In foreman this method defines a lot of special actions.
Actions