Project

General

Profile

Actions

Bug #10918

closed

Provisioning templates no longer resolve/available for non-admin users in Foreman 1.7.5

Added by Tomasz Nowak almost 9 years ago. Updated over 6 years ago.

Status:
Feedback
Priority:
High
Assignee:
-
Category:
Organizations and Locations
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

After upgrading Foreman from 1.7.4 -> 1.7.5, provisioning templates are no longer resolvable/usable for non-admin users trying to provision new machines.

It seems "All templates" check box in Organization tab is not being correctly applied when user belong to many Organizations and when user context is set to "Any Organization".

Changes in app/models/concerns/taxonomix.rb seem to have caused the regression:

diff app/models/concerns/taxonomix.rb app_1.7.5/models/concerns/taxonomix.rb
80c80
<       if SETTINGS[:organizations_enabled] && org
---
>       if SETTINGS[:organizations_enabled] && org.present?

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #9947: CVE-2015-1844 - GET /api/hosts doesn't respect organization/location membershipClosedMarek Hulán03/30/2015Actions
Actions #1

Updated by Dominic Cleal almost 9 years ago

  • Description updated (diff)
  • Category set to Organizations and Locations

The change you mention in the diff is pretty much meaningless in this context, I can't see how it'd have any effect. Did reverting it fix the issue for you?

Another recently fixed issue was #10342, which prevented any host with parameters from resolving templates. Perhaps that's it?

Actions #2

Updated by Dominic Cleal almost 9 years ago

Oh, re-reading then it's probably related to #9947 which changed multi-org lookups.

Actions #3

Updated by Dominic Cleal almost 9 years ago

  • Related to Bug #9947: CVE-2015-1844 - GET /api/hosts doesn't respect organization/location membership added
Actions #4

Updated by Tomasz Nowak almost 9 years ago

The issue expose itself only if you are non-admin, belong to many organizations, organizations have "All templates" box checked and your context is "Any Organization".
In that case you won't be able to to provisions any hosts with the error message:

"
Unable to save
No PXELinux templates were found for this host, make sure you define at least one in your ... settings
"

Reverting the foreman to 1.7.4 fixed the issue.
I'm thinking now on upgrading to 1.7.5 again for security fixes but manually add each template to organizations instead of using "All templates" box as a workaround.

Actions #5

Updated by Anonymous almost 7 years ago

what's the status here with current versions?

Actions #6

Updated by Anonymous over 6 years ago

  • Status changed from New to Feedback
Actions

Also available in: Atom PDF