Project

General

Profile

Bug #21465

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

Added by Marek Hulán 10 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Organizations and Locations
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
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

Related to Foreman - Bug #16363: "Unknown member type" error when deleting or editing usergroups with users from different locationsClosed2016-08-29

Associated revisions

Revision 1fa10070 (diff)
Added by Marek Hulán 7 months ago

Fixes #21465 - load owners from any context

History

#1 Updated by Marek Hulán 10 months ago

  • Description updated (diff)

#2 Updated by Marek Hulán 10 months ago

  • Related to Bug #16363: "Unknown member type" error when deleting or editing usergroups with users from different locations added

#3 Updated by The Foreman Bot 10 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4954 added

#4 Updated by Marek Hulán 10 months ago

  • Target version set to 1.16.0-RC1

#5 Updated by Marek Hulán 10 months ago

  • Target version changed from 1.16.0-RC1 to 1.16.2

#6 Updated by Marek Hulán 9 months ago

  • Target version changed from 1.16.2 to 1.16.1

#7 Updated by Marek Hulán 8 months ago

  • Target version changed from 1.16.1 to 238

#8 Updated by Marek Hulán 7 months ago

  • Bugzilla link set to 1533044

#9 Updated by Marek Hulán 7 months ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#10 Updated by Daniel Lobato Garcia 7 months ago

  • Legacy Backlogs Release (now unused) set to 296

#11 Updated by Marek Hulán 7 months ago

  • Legacy Backlogs Release (now unused) changed from 296 to 330

Also available in: Atom PDF