Attr_accessible - plugins information, action required

Hi foreman devs - particularly plugin authors this time,

As part of the Rails 4 upgrade, we are moving to attr_accessible to
enforce mass assignment protection on Rails models. We want to merge
this a bit before than Rails 4 itself.

If your plugin extends Foreman models and uses mass assignment on the
attributes it extends, you will need to whitelist these in your plugin.

I made a few pull requests to projects where I saw some failures:

Katello - https://github.com/Katello/katello/pull/5615
Discovery - https://github.com/theforeman/foreman_discovery/pull/233
Salt - https://github.com/theforeman/foreman_salt/pull/55

As a secondary reminder - Tom Caspy gave yesterday an overview of
changes on Rails 4 that you probably want to be aware if you're
developing a plugin - https://youtu.be/RCqwTtIXRSw?t=28m32s

Thanks!

··· -- Daniel Lobato Garcia

@dLobatog


GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
Keybase: https://keybase.io/elobato

The Foreman PR's been merged, so please check your tests status and
whitelist additional attributes on core models where required.


Dominic Cleal
dominic@cleal.org

··· On 20/11/15 10:38, Daniel Lobato Garcia wrote: > Hi foreman devs - particularly plugin authors this time, > > As part of the Rails 4 upgrade, we are moving to attr_accessible > to enforce mass assignment protection on Rails models. We want to > merge this a bit before than Rails 4 itself. > > https://github.com/theforeman/foreman/pull/2922 > > If your plugin extends Foreman models and uses mass assignment on > the attributes it extends, you will need to whitelist these in your > plugin. > > I made a few pull requests to projects where I saw some failures: > > Katello - https://github.com/Katello/katello/pull/5615 Discovery - > https://github.com/theforeman/foreman_discovery/pull/233 Salt - > https://github.com/theforeman/foreman_salt/pull/55