Feature #32881
closedExpose previous application record revision through safemode
Description
Webhooks plugin needs to allow access to previous revisions which is very useful for hooking to database updates. This is safe to do thanks to audited gem, however, during testing I have found out that Safemode does not work properly. All our application record classes define Jail inner class from Safemode::Jail therefore all allowed methods defined in ApplicationRecord::Jail are completely ignored. Since the previous record revision can be safely enabled for all records, this must be also fixed.
Unfortunately, the change brings incompatibility to plugins which reopens the class, e.g. bootdisk and ansible, the exception is foreman_ansible/app/models/concerns/foreman_ansible/hostgroup_extensions.rb:50:in `<class:Hostgroup>': superclass mismatch for class Jail (TypeError) and to solve that, new plugin API method will be introduced so plugins can be fixed.