Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API query for hypervisor returns no result when using /api/organization #71

Open
kallies opened this issue Nov 7, 2019 · 1 comment · May be fixed by #72
Open

API query for hypervisor returns no result when using /api/organization #71

kallies opened this issue Nov 7, 2019 · 1 comment · May be fixed by #72

Comments

@kallies
Copy link

kallies commented Nov 7, 2019

I defined a role with the permissions mentioned in README.md. This worked for a while (at least with Satellite 6.3, I observe the issue with 6.4 and 6.5). katello-attach-subscription searches for hypervisors by leverating /api/organizations/1/hosts?search=hypervisor%3Dtrue. This returns an emtpy result when the user only has the described permissions:

{
  "total": 0,
  "subtotal": 0,
  "page": 1,
  "per_page": 50,
  "search": "hypervisor=true",
  "sort": {
    "by": null,
    "order": null
  },
  "results": []
}

This call works with full (Admin) permissions though. The search term hypervisor = true works in the UI with limited permissions, but the UI uses /api/hosts?search=hypervisor%3Dtrue&page=1 (no /organizations/1):

{
  "total": 24,
  "subtotal": 4,
  "page": 1,
  "per_page": 50,
  "search": "hypervisor=true",
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
//elements removed in this example
]

The missing hypervisor list leads doesn't allow kas to attach subscriptions because it is not aware of any hypervisor.

Searching for Hypervisors
Completed hypervisor collection.
Hypervisors entry: 0
@kallies
Copy link
Author

kallies commented Nov 7, 2019

The call works when I assign the following additional permission:

Resource Permissions
Organization view_organizations

@kallies kallies linked a pull request Nov 7, 2019 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant