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.
DescriptionAshfaqur Rahaman
2021-05-05 00:53:41 UTC
Description of problem:
Currently API result for role filter only returns ID. as a FutureFeature, can we add "Name" field along with the ID.
Version-Release number of selected component (if applicable):
6.8
How reproducible:
100%
Description:
Currently the roles API only returns the filter ID.
~~~~~~
# curl -vvv -H 'Content-Type: application/json' -X GET https://user:password@satellite.com/api/roles/11
{"builtin":0,"cloned_from_id":28,"name":"Group Admin","id":10,"description":"","origin":null,"filters":[{"id":142},{"id":150},{"id":111},{"id":151},{"id":154},{"id":155},{"id":156},{"id":157},{"id":158},{"id":159},{"id":160},{"id":161},{"id":162},{"id":161},{"id":164},{"id":165},{"id":166},{"id":167},{"id":168},{"id":169},{"id":170},{"id":171},{"id":172},{"id":171},{"id":541},{"id":544}],"locations":[{"id":8,"name":"city","title":"Brisbane/City ","description":""}],"organizations":[{"id":1,"name":"abcd","title":"abcd","description":""}]}
~~~~~~
The filters property within the role resource is expected to be represented in the same structure as locations and organizations.
Typically the apipie bindings returns a tuple for a resource reference that includes an id, name and (optional) title. The debug output listed below is for a simple roles lookup, where the organizations and locations properties are returned in the expected form, whereas the filters property only returns the id.
```
I, [2021-04-26T12:09:11.220718 #10555] INFO -- : GET /api/roles/10
D, [2021-04-26T12:09:11.220757 #10555] DEBUG -- : Params: {}
D, [2021-04-26T12:09:11.220772 #10555] DEBUG -- : Headers: {:params=>{}}
D, [2021-04-26T12:09:11.220802 #10555] DEBUG -- : Using authenticator: ApipieBindings::Authenticators::BasicAuth
D, [2021-04-26T12:09:19.405679 #10555] DEBUG -- : Response: {"builtin"=>0, "cloned_from_id"=>28, "name"=>"Group Admin", "id"=>10, "description"=>"", "origin"=>nil, "filters"=>[{"id"=>149}, {"id"=>150}, {"id"=>151}, {"id"=>151}, {"id"=>154}, {"id"=>155}, {"id"=>156}, {"id"=>157}, {"id"=>158}, {"id"=>159}, {"id"=>160}, {"id"=>161}, {"id"=>162}, {"id"=>161}, {"id"=>164}, {"id"=>165}, {"id"=>166}, {"id"=>167}, {"id"=>168}, {"id"=>169}, {"id"=>170}, {"id"=>171}, {"id"=>172}, {"id"=>171}, {"id"=>541}, {"id"=>544}], "locations"=>[{"id"=>8, "name"=>"CTI", "title"=>"Victoria/City West/CTI", "description"=>""}], "organizations"=>[{"id"=>1, "name"=>"abcd", "title"=>"abcd", "description"=>""}]}
```
The design pattern for nearly every other field is in line with the locations and organizations fields:
"locations"=>[{"id"=>1, "name"=>"City", "title"=>"Brisbane", "description"=>""}], "organizations"=>[{"id"=>1, "name"=>"abcd", "title"=>"abcd", "description"=>""}]}
As a Future Feature, returning the name of the filter along side the id would then be consistent with the other attributes as below :
"filters"=>[{"id"=>149, "name"=>"Viewer" }, {"id"=>150, "name"=>"Manager"},....]
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.11 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-2022:5498
Comment 13Red Hat Bugzilla
2023-09-18 00:26:24 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days