Project

General

Profile

Feature #15741

Use parameter_filter instead of attr_accessible

Added by David Davis about 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
hard
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Foreman is dropping support for protected_attributes and we need to switch to their new way of whitelisting attributes. See here for more info:

http://projects.theforeman.org/projects/foreman/wiki/Strong_parameters#Changing-core-extensions-to-use-the-plugin-API

Here's the Foreman PR:

https://github.com/theforeman/foreman/pull/3659


Related issues

Related to Foreman - Feature #3917: Add strong_parameters to foremanClosed2013-12-19
Has duplicate Katello - Bug #5158: Remove attr_accessible from KatelloDuplicate2014-04-11
Has duplicate Katello - Bug #16109: db_seed fails with Host::Managed is using attr_accessible so must either be converted to strong parameters, or add the protected_attributes gemDuplicate2016-08-15

Associated revisions

Revision 328ee19a (diff)
Added by David Davis almost 3 years ago

Fixes #15741 - Use parameter_filter to whitelist attrs (#6194)

History

#1 Updated by David Davis about 3 years ago

  • Project changed from Foreman to Katello

#2 Updated by David Davis about 3 years ago

  • Category changed from API to API

#3 Updated by David Davis about 3 years ago

  • Related to Bug #3659: "no implicit conversion of URI::HTTP into String" running rake reports:summarize added

#4 Updated by David Davis about 3 years ago

  • Related to deleted (Bug #3659: "no implicit conversion of URI::HTTP into String" running rake reports:summarize)

#5 Updated by David Davis about 3 years ago

  • Related to Feature #3917: Add strong_parameters to foreman added

#6 Updated by David Davis about 3 years ago

  • Assignee deleted (David Davis)

#7 Updated by David Davis about 3 years ago

One option would be to add protected_attributes as a dependency for Katello but I'd probably recommend against it. We use strong_params pretty much everywhere--except when extending the foreman models. We call attr_accessible in about 8 places that I think we can switch over to parameter_filter. I am going to investigate that route.

#8 Updated by The Foreman Bot about 3 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to David Davis
  • Pull request https://github.com/Katello/katello/pull/6194 added

#9 Updated by David Davis about 3 years ago

  • Has duplicate Bug #5158: Remove attr_accessible from Katello added

#10 Updated by Justin Sherrill almost 3 years ago

  • Legacy Backlogs Release (now unused) set to 162
  • Difficulty set to hard

#11 Updated by Anonymous almost 3 years ago

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

#12 Updated by David Davis almost 3 years ago

  • Has duplicate Bug #16109: db_seed fails with Host::Managed is using attr_accessible so must either be converted to strong parameters, or add the protected_attributes gem added

Also available in: Atom PDF