Project

General

Profile

Bug #16596

getting smart_class_variables via API not working

Added by Adam Winberg about 4 years ago. Updated about 4 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
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?

History

#1 Updated by Dominic Cleal about 4 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.

#2 Updated by Adam Winberg about 4 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.

#3 Updated by Dominic Cleal about 4 years ago

  • Status changed from Closed to Rejected

Thanks for reporting back, glad it's sorted.

Also available in: Atom PDF