Actions
Bug #21176
closedPlugin#parameter_filter doesn't work properly with block argument
Description
In plugin api for rex, we had
parameter_filter(Nic::Interface, :execution)
This didn't work, because the filter works only for non-nested params (which nic isn't).
Therefore, we needed to use block instead.
parameter_filter Nic::Interface do |ctx| ctx.permit :execution end
The problem is, we're using filter.pop
https://github.com/theforeman/foreman/blob/616669d83b0f568bbe0bf13013de042bbf4f3951/app/services/foreman/parameter_filter.rb#L19
which leads to the rules to loosing the saved block at the first call, and leads to the rules to not actually apply.
Actions