Project

General

Profile

Actions

Bug #21465

closed

Setting owner does not work under non-admin user in some taxonomy

Added by Marek Hulán about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Organizations and Locations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

The host owner association is polymorphic belongs_to and in case we're in specific Organization, it applies default scope from Taxonomix, therefore it can't find owner by just calling self.owner. This causes problems in Katello when register content host in a specific org.

The issue can be probably reproduced also in core, make sure a host is owner by e.g. admin who's not in any organization, then under user in specific org/loc try to edit it. The before_validation fitler that sets the owner will fail to find self.owner even though self.owner_id is 3 and self.owner_type is admin.

The similar fix like for #16363 should help


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #16363: "Unknown member type" error when deleting or editing usergroups with users from different locationsClosedMarek Hulán08/29/2016Actions
Actions

Also available in: Atom PDF