Feature #32881
Expose 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.
Associated revisions
History
#1
Updated by The Foreman Bot over 1 year ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/8620 added
#2
Updated by The Foreman Bot over 1 year ago
- Status changed from Ready For Testing to New
- Pull request deleted (
https://github.com/theforeman/foreman/pull/8620)
#3
Updated by The Foreman Bot over 1 year ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/8620 added
#4
Updated by Oleh Fedorenko 9 months ago
- Assignee changed from Lukas Zapletal to Oleh Fedorenko
- Status changed from Ready For Testing to Assigned
- Pull request deleted (
https://github.com/theforeman/foreman/pull/8620)
#5
Updated by The Foreman Bot 9 months ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/9258 added
#6
Updated by The Foreman Bot 9 months ago
- Fixed in Releases 3.4.0 added
#7
Updated by Oleh Fedorenko 9 months ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|fc8b9d39aadcdec28ef487728d3fab52180397ae.
Fixes #32881 - Expose previous application record revision through safemode (#9258)