Hi
I am able to send post/put requests successfully as Admin user using
Foreman API V2.
But, when i use a non admin user, i get the following error.
Thu, 10 Dec 2015 11:20:05 DEBUG "POST
/api/hosts/<host_name>/smart_class_parameters/cron_ensure/override_values
HTTP/1.1" 403 None
Thu, 10 Dec 2015 11:20:05 ERROR addSmartClassParameterToHost::Exception:
Failed to modify the smart class parameter <host_name>
('ForemanUtil::postResources:', 'Forbidden')
Let me know if any filters need to be assigned to user for this operation
to be successful. I have assigned below permissions.
<https://lh3.googleusercontent.com/-2vfj8FVEG6E/Vmodv__KNQI/AAAAAAAADqY/6s9Q4tOkXDg/s1600/permissions.jpg>
Regards,
Amith
I think you also need the "external_variables" permissions for smart
class parameters.
···
On 11/12/15 00:51, Amith Reddy Ravuru wrote:
>
> Hi
>
> I am able to send post/put requests successfully as Admin user using
> Foreman API V2.
>
> But, when i use a non admin user, i get the following error.
>
> Thu, 10 Dec 2015 11:20:05 DEBUG "POST
> /api/hosts//smart_class_parameters/cron_ensure/override_values HTTP/1.1"
> 403 None
> Thu, 10 Dec 2015 11:20:05 ERROR addSmartClassParameterToHost::Exception:
> Failed to modify the smart class parameter
> ('ForemanUtil::postResources:', 'Forbidden')
>
> Let me know if any filters need to be assigned to user for this
> operation to be successful. I have assigned below permissions.
–
Dominic Cleal
dominic@cleal.org
Thanks for the reply.
I don't find external_variables resource in foreman UI. I am using version
1.9.3.
Can you help me to point out in foreman UI?
···
On Friday, December 11, 2015 at 12:33:08 AM UTC-8, Dominic Cleal wrote:
>
> On 11/12/15 00:51, Amith Reddy Ravuru wrote:
> >
> > Hi
> >
> > I am able to send post/put requests successfully as Admin user using
> > Foreman API V2.
> >
> > But, when i use a non admin user, i get the following error.
> >
> > Thu, 10 Dec 2015 11:20:05 DEBUG "POST
> >
> /api/hosts//smart_class_parameters/cron_ensure/override_values
> HTTP/1.1"
> > 403 None
> > Thu, 10 Dec 2015 11:20:05 ERROR addSmartClassParameterToHost::Exception:
> > Failed to modify the smart class parameter
> > ('ForemanUtil::postResources:', 'Forbidden')
> >
> > Let me know if any filters need to be assigned to user for this
> > operation to be successful. I have assigned below permissions.
>
> I think you also need the "external_variables" permissions for smart
> class parameters.
>
> --
> Dominic Cleal
> dom...@cleal.org
>
Ah sorry, it's under the "Lookup key" resource type.
···
On 11/12/15 10:02, Amith Reddy Ravuru wrote:
> Thanks for the reply.
>
> I don't find external_variables resource in foreman UI. I am using
> version 1.9.3.
>
> Can you help me to point out in foreman UI?
–
Dominic Cleal
dominic@cleal.org
Saved a lot of time ![:slight_smile: :slight_smile:](https://community.theforeman.org/images/emoji/twitter/slight_smile.png?v=5)
Thanks so much!! It worked!!
···
On Friday, December 11, 2015 at 2:04:28 AM UTC-8, Dominic Cleal wrote:
>
> On 11/12/15 10:02, Amith Reddy Ravuru wrote:
> > Thanks for the reply.
> >
> > I don't find external_variables resource in foreman UI. I am using
> > version 1.9.3.
> >
> > Can you help me to point out in foreman UI?
>
> Ah sorry, it's under the "Lookup key" resource type.
>
> --
> Dominic Cleal
> dom...@cleal.org
>