Project

General

Profile

Actions

Bug #5879

closed

undefined local variable or method `scoped_search_definition' setting when setting permission filters

Added by Partha Aji almost 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Users, Roles and Permissions
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

1) Goto Roles
2) Select "Filters and Permissions" next to a Role
3) Select New filter
4) Select "Architecture" or "Compute Resource" under resource type

Error reported in the server..

NameError (undefined local variable or method `scoped_search_definition' for #<Class:0x0000000c7d4f18>):
app/models/concerns/authorizable.rb:31:in `allows_taxonomy_filtering?'
app/models/concerns/authorizable.rb:35:in `allows_organization_filtering?'
app/controllers/permissions_controller.rb:14:in `index'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'

Rendered /home/paji/.rvm/gems/ruby-2.0.0-p481/gems/actionpack-3.2.18/lib/action_dispatch/middleware/templates/rescues/_trace.erb (0.8ms)
Rendered /home/paji/.rvm/gems/ruby-2.0.0-p481/gems/actionpack-3.2.18/lib/action_dispatch/middleware/templates/rescues/_request_and_response.erb (0.7ms)
Rendered /home/paji/.rvm/gems/ruby-2.0.0-p481/gems/actionpack-3.2.18/lib/action_dispatch/middleware/templates/rescues/diagnostics.erb within rescues/layout (5.9ms)

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #5664: Users permissions on hosts are not working properly with organizationsClosedMarek Hulán05/11/2014Actions
Actions #1

Updated by Dominic Cleal almost 10 years ago

  • Related to Bug #5664: Users permissions on hosts are not working properly with organizations added
Actions #2

Updated by Dominic Cleal almost 10 years ago

  • Subject changed from Unable to set permission filters to undefined local variable or method `scoped_search_definition' setting when setting permission filters
  • Status changed from New to Need more information

Can you add some debug and work out what class it's failing on? Especially if you have plugins like Katello installed, since I can't replicate this on a clean Foreman installation.

It would appear from a quick code inspection that the class might not be using scoped_search, but is responding to search_for (i.e. that it's "granular" according to Filter#granular but the class doesn't respond to scoped_search_definition).

Actions #3

Updated by Dominic Cleal almost 10 years ago

  • Status changed from Need more information to New

Oh, I think I see... #5664 starts using .scoped_search_definition, but this was only added in scoped_search 2.7.0 while we depend on >= 2.6.2.

Please try updating scoped_search to >= 2.7.0 and see if that fixes it.

Actions #4

Updated by Partha Aji almost 10 years ago

Worked with scoped_search to >= 2.7.0 . Thanks!. Can ya update it in develop ?

Actions #5

Updated by Dominic Cleal almost 10 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Dominic Cleal
  • Target version set to 1.8.2
  • translation missing: en.field_release set to 16
Actions #6

Updated by Bryan Kearney almost 10 years ago

  • Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1107675
Actions #7

Updated by Anonymous almost 10 years ago

  • Target version changed from 1.8.2 to 1.8.1
Actions #8

Updated by Dominic Cleal almost 10 years ago

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

Also available in: Atom PDF