Bug 1726288

Summary: Can edit template inputs of locked template through CLI and API
Product: Red Hat Satellite Reporter: Lukáš Hellebrandt <lhellebr>
Component: ReportingAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: Lukáš Hellebrandt <lhellebr>
Severity: medium Docs Contact:
Priority: high    
Version: 6.6.0CC: aagrawal, egolov, inecas, jsherril, mhulan, oprazak, wpinheir
Target Milestone: 6.9.0Keywords: Triaged, UserExperience
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: foreman-2.3.0-0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-04-21 13:11:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukáš Hellebrandt 2019-07-02 13:53:03 UTC
Description of problem:
When a template is locked, its inputs can't be edited in WebUI but they can be edited through CLI and API.

Version-Release number of selected component (if applicable):
Reproduced on Sat 6.6 snap 9

How reproducible:
Deterministic

Steps to Reproduce:
0. Have some locked template
1. $ hammer template-input create --template-id <id> --input-type user --name <newname>
Template input created

Actual results:
Template input added to the template

Expected results:
I shouldn't be able to edit anything in the template

Additional info:
This is probably because template-input is handled as a different entity than the template itself

Comment 3 Brad Buckingham 2019-07-02 17:08:36 UTC
Is this a regression from 6.5?

Comment 4 Lukáš Hellebrandt 2019-07-03 08:54:47 UTC
No.

Comment 5 Ondřej Pražák 2019-11-07 09:11:29 UTC
Created redmine issue https://projects.theforeman.org/issues/28210 from this bug

Comment 6 Bryan Kearney 2020-09-14 16:03:28 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/28210 has been resolved.

Comment 7 Justin Sherrill 2020-09-15 02:21:05 UTC
moving back to assigned since an issue was found with the original fix

Comment 8 Bryan Kearney 2020-09-15 04:03:29 UTC
Upstream bug assigned to jsherril

Comment 9 Bryan Kearney 2020-09-15 04:03:31 UTC
Upstream bug assigned to jsherril

Comment 10 Bryan Kearney 2020-09-15 20:03:41 UTC
Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/30843 has been resolved.

Comment 11 Lukáš Hellebrandt 2021-01-14 11:17:58 UTC
Verified with Sat 6.9 snap 8.0. Attempts to create/update/delete template inputs to a locked template now result in: "This template is locked. Please clone it to a new template to customize." or "Cannot delete template input as template is locked." respectively.

Comment 14 errata-xmlrpc 2021-04-21 13:11:48 UTC
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 (Moderate: Satellite 6.9 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-2021:1313