Project

General

Profile

Refactor #10025

Move taxonomy related methods and scopes to Host::Base

Added by Marek Hulán about 4 years ago. Updated 10 months 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

Host::Base already deals with taxonomies, but for some reason we define default_scope and other essential taxonomies related methods in Host::Manage descendant class. That can easy lead to duplication and out of sync of other inheriting classes in plugins (e.g. discovery). We should move all taxonomy related code that is not specific for Host::Manage to Host::Base.


Related issues

Related to Foreman - Tracker #10022: Taxonomies related issuesNew2015-04-05

Related to Discovery - Bug #10005: CVE-2015-1844 - Discovery hosts are not restricted to user taxonomiesClosed2015-04-02
Related to Foreman - Bug #9947: CVE-2015-1844 - GET /api/hosts doesn't respect organization/location membershipClosed2015-03-30

Associated revisions

Revision bf75590c (diff)
Added by Marek Hulán about 4 years ago

Fixes #10025 - move generic taxonomies code to base class

Revision 593f69a6 (diff)
Added by Marek Hulán about 4 years ago

Fixes #10025 - move generic taxonomies code to base class

(cherry picked from commit bf75590c49c05dd780df388908598c85fc8f53bd)

Revision 917e5f6c (diff)
Added by Marek Hulán almost 4 years ago

Fixes #10025 - move generic taxonomies code to base class

(cherry picked from commit bf75590c49c05dd780df388908598c85fc8f53bd)

Conflicts:
app/models/host/base.rb
app/models/host/managed.rb

History

#1 Updated by Marek Hulán about 4 years ago

#2 Updated by Marek Hulán about 4 years ago

  • Related to Bug #10005: CVE-2015-1844 - Discovery hosts are not restricted to user taxonomies added

#3 Updated by The Foreman Bot about 4 years ago

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

#4 Updated by Dominic Cleal about 4 years ago

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

#5 Updated by Dominic Cleal about 4 years ago

  • Legacy Backlogs Release (now unused) set to 40

#6 Updated by Marek Hulán about 4 years ago

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

Also available in: Atom PDF