Project

General

Profile

Actions

Bug #16596

closed

getting smart_class_variables via API not working

Added by Adam Winberg over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Tried my luck with this on the mailinglist, but since no one hade any suggestions i'm trying it as a bug.

I'm trying to retrieve values for a specific smart_class_variable via API, but not getting any results. The user I am using to do this has the 'viewer' role which has worked in the past, but somewhere along the line it stopped working - unfortunately I cant say exactly which update introduced the change.

I am now running on 1.12.2 on RHEL 7.2.

This is my request:

GET /api/smart_class_parameters/1426

A simple 'GET'. Results in:

{"message":"Smart class parameter not found by id '1426'"}

I have tried to add numerous types of permission filters to my user to no luck. The only way I can get it to work is to tick the 'administrator' box for the user.

Am I missing something here? Is it a bug or am I just doing it wrong?

Actions #1

Updated by Dominic Cleal over 7 years ago

Could you enable debugging (especially SQL and permissions debugging) and attach production.log from the request? https://theforeman.org/manuals/1.12/index.html#7.2Debugging has more info.

Actions #2

Updated by Adam Winberg over 7 years ago

  • Status changed from New to Closed

I found the problem and it was not really a bug - for some reason the db migrate process had not succeeded when i upgraded. When I tried to run it manually it also failed. There seemed to be a problem when it tried to remove the old 'default' role, but after some manual fiddling I got the migrate to run through and then my api requests work as expected.

Actions #3

Updated by Dominic Cleal over 7 years ago

  • Status changed from Closed to Rejected

Thanks for reporting back, glad it's sorted.

Actions

Also available in: Atom PDF