Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Creation of a bookmark via API does not require 'public' attribute to be set, which results in 'public': null in the created entity.
Version-Release number of selected component (if applicable):
# rpm -qa katello
katello-2.5.0-3.nightly.el7.noarch
# rpm -qa foreman
foreman-1.11.0-0.develop.201601241936gitd600a50.el7.noarch
# rpm -qa foreman-*
foreman-gce-1.11.0-0.develop.201601241936gitd600a50.el7.noarch
foreman-libvirt-1.11.0-0.develop.201601241936gitd600a50.el7.noarch
foreman-release-1.11.0-0.develop.201601241936gitd600a50.el7.noarch
foreman-vmware-1.11.0-0.develop.201601241936gitd600a50.el7.noarch
foreman-selinux-1.11.0-0.develop.201601041235git6234447.el7.noarch
foreman-ovirt-1.11.0-0.develop.201601241936gitd600a50.el7.noarch
foreman-postgresql-1.11.0-0.develop.201601241936gitd600a50.el7.noarch
foreman-compute-1.11.0-0.develop.201601241936gitd600a50.el7.noarch
foreman-proxy-1.11.0-0.develop.201601211502git0a70eea.el7.noarch
foreman-release-scl-2-1.el7.x86_64
foreman-debug-1.11.0-0.develop.201601241936gitd600a50.el7.noarch
# rpm -qa *-katello
pulp-katello-0.4-3.el7.noarch
tfm-rubygem-katello-2.5.0-.201601221853git276ce3d1.nightly.el7.noarch
How reproducible:
always
Steps to Reproduce:
1. send a POST request to <fqdn>/api/bookmarks specifying only a name, query and a controller attribute.
e.g.:
curl -ku admin:changeme -H Content-Type:application/json -d "{\"name\":\"foo\",\"query\":\"bar\", \"controller\":\"organizations\"}" 'https://<FQDN>/api/bookmarks'
Actual results:
{"name":"foo","controller":"organizations","query":"bar","public":null,"id":12,"owner_id":3,"owner_type":"User"}
Expected results:
public attribute should be set - so either an error should be returned forcing user to specify True/False. Or a default value should be assigned (False)
VERIFIED
sat6.3 snap3
public set to false if not set.
curl -ku admin:changeme -H Content-Type:application/json -d "{\"name\":\"foo\",\"query\":\"bar\", \"controller\":\"organizations\"}" "https://$(hostname)/api/bookmarks"
# curl -ku admin:changeme "https://$(hostname)/api/bookmarks?search=foo"
{
"total": 15,
"subtotal": 1,
"page": 1,
"per_page": 20,
"search": "foo",
"sort": {
"by": null,
"order": null
},
"results": [{"name":"foo","controller":"organizations","query":"bar","public":false,"id":15,"owner_id":3,"owner_type":"User"}]
}
Comment 5Satellite Program
2018-02-21 16:49:54 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, 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-2018:0336
Description of problem: Creation of a bookmark via API does not require 'public' attribute to be set, which results in 'public': null in the created entity. Version-Release number of selected component (if applicable): # rpm -qa katello katello-2.5.0-3.nightly.el7.noarch # rpm -qa foreman foreman-1.11.0-0.develop.201601241936gitd600a50.el7.noarch # rpm -qa foreman-* foreman-gce-1.11.0-0.develop.201601241936gitd600a50.el7.noarch foreman-libvirt-1.11.0-0.develop.201601241936gitd600a50.el7.noarch foreman-release-1.11.0-0.develop.201601241936gitd600a50.el7.noarch foreman-vmware-1.11.0-0.develop.201601241936gitd600a50.el7.noarch foreman-selinux-1.11.0-0.develop.201601041235git6234447.el7.noarch foreman-ovirt-1.11.0-0.develop.201601241936gitd600a50.el7.noarch foreman-postgresql-1.11.0-0.develop.201601241936gitd600a50.el7.noarch foreman-compute-1.11.0-0.develop.201601241936gitd600a50.el7.noarch foreman-proxy-1.11.0-0.develop.201601211502git0a70eea.el7.noarch foreman-release-scl-2-1.el7.x86_64 foreman-debug-1.11.0-0.develop.201601241936gitd600a50.el7.noarch # rpm -qa *-katello pulp-katello-0.4-3.el7.noarch tfm-rubygem-katello-2.5.0-.201601221853git276ce3d1.nightly.el7.noarch How reproducible: always Steps to Reproduce: 1. send a POST request to <fqdn>/api/bookmarks specifying only a name, query and a controller attribute. e.g.: curl -ku admin:changeme -H Content-Type:application/json -d "{\"name\":\"foo\",\"query\":\"bar\", \"controller\":\"organizations\"}" 'https://<FQDN>/api/bookmarks' Actual results: {"name":"foo","controller":"organizations","query":"bar","public":null,"id":12,"owner_id":3,"owner_type":"User"} Expected results: public attribute should be set - so either an error should be returned forcing user to specify True/False. Or a default value should be assigned (False)