Project

General

Profile

Bug #13437

Bookmarks - 'public' attribute not mandatory

Added by roman plevka almost 5 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
API
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1302725
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):
  1. rpm -qa katello
    katello-2.5.0-3.nightly.el7.noarch
  2. rpm -qa foreman
    foreman-1.11.0-0.develop.201601241936gitd600a50.el7.noarch
  3. 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
  4. 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)

Associated revisions

Revision d2de4926 (diff)
Added by roman plevka over 4 years ago

fixes #13437 - Bookmarks public attribute set to required

History

#1 Updated by The Foreman Bot almost 5 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3136 added

#2 Updated by roman plevka over 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Dominic Cleal over 4 years ago

  • Assignee set to roman plevka
  • Legacy Backlogs Release (now unused) set to 136

Also available in: Atom PDF