Project

General

Profile

Actions

Bug #21176

closed

Plugin#parameter_filter doesn't work properly with block argument

Added by Ivan Necas over 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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.


Related issues 1 (0 open1 closed)

Blocks Foreman Remote Execution - Bug #21178: unable to set non-primary remote execution interfaceClosedIvan Necas10/03/2017Actions
Actions #1

Updated by The Foreman Bot over 6 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4886 added
Actions #2

Updated by Ivan Necas over 6 years ago

  • Related to Bug #21178: unable to set non-primary remote execution interface added
Actions #3

Updated by Ivan Necas over 6 years ago

  • Related to deleted (Bug #21178: unable to set non-primary remote execution interface)
Actions #4

Updated by Ivan Necas over 6 years ago

  • Blocks Bug #21178: unable to set non-primary remote execution interface added
Actions #5

Updated by Ivan Necas over 6 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #6

Updated by Daniel Lobato Garcia over 6 years ago

  • translation missing: en.field_release set to 296

1.16 candidate?

Actions

Also available in: Atom PDF