Actions
Bug #21465
closedSetting owner does not work under non-admin user in some taxonomy
Status:
Closed
Priority:
Normal
Assignee:
Category:
Organizations and Locations
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
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
Actions