The bug is completely identical to: https://bugzilla.redhat.com/show_bug.cgi?id=1805678 but for API (and possibly CLI). Steps to Reproduce: 1. use API or Hammer to update a locked template and add a comment to it Actual results: notice the update is updated audit record regarding created audit comment is created Expected results: Error message should be retrieved saying that user is unable to update locked templates.
Created redmine issue https://projects.theforeman.org/issues/30317 from this bug
Upstream bug assigned to oprazak
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30317 has been resolved.
VERIFIED on sat6.8.0-14 # hammer template update --id 100 --audit-comment foobar Could not update the provisioning template: Cannot add audit comment to a locked template. - no record created in audits
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: Satellite 6.8 release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2020:4366