Project

General

Profile

Actions

Bug #15278

closed

Organization/Location edit fails for user with granular filters on taxable resources

Added by Marek Hulán almost 8 years ago. Updated almost 6 years ago.

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

Description

To reproduce, log in as a user that can edit organizations and has filter with view_domains permission limited by some condition, e.g. "name = example.tst". Then try to edit organization, you'll get following error.

2016-06-03T10:12:33 [app] [I] Completed 500 Internal Server Error in 598ms (ActiveRecord: 26.7ms)
2016-06-03T10:12:33 [app] [F] 
 | ActionView::Template::Error (undefined method `+' for nil:NilClass):
 |     72:         <%= show_resource_if_allowed(f, taxonomy, :media) %>
 |     73:         <%= show_resource_if_allowed(f, taxonomy, :provisioning_templates) %>
 |     74:         <%= show_resource_if_allowed(f, taxonomy, :ptables) %>
 |     75:         <%= show_resource_if_allowed(f, taxonomy, :domains) %>
 |     76:         <%= show_resource_if_allowed(f, taxonomy, :realms) %>
 |     77:       <% end %>
 |     78: 
 |   app/helpers/taxonomy_helper.rb:168:in `block in show_resource_if_allowed'
 |   app/helpers/taxonomy_helper.rb:161:in `show_resource_if_allowed'
 |   app/views/taxonomies/_form.html.erb:75:in `block in _41d581d22153a1f3bc601f3bab07e05e'
 |   app/helpers/form_helper.rb:258:in `form_for'
 |   app/views/taxonomies/_form.html.erb:3:in `_41d581d22153a1f3bc601f3bab07e05e'
 |   app/views/taxonomies/edit.html.erb:4:in `_b131f05b99c73b981f94f66e0d5cc429'
 |   app/controllers/concerns/foreman/controller/taxonomies_controller.rb:67:in `block in edit'
 |   app/models/taxonomy.rb:76:in `block in no_taxonomy_scope'
 |   app/models/taxonomy.rb:83:in `block (2 levels) in as_taxonomy'
 |   app/models/concerns/foreman/thread_session.rb:147:in `as_location'
 |   app/models/taxonomy.rb:82:in `block in as_taxonomy'
 |   app/models/concerns/foreman/thread_session.rb:112:in `as_org'
 |   app/models/taxonomy.rb:81:in `as_taxonomy'
 |   app/models/taxonomy.rb:75:in `no_taxonomy_scope'
 |   app/controllers/concerns/foreman/controller/taxonomies_controller.rb:65:in `edit'
 |   app/controllers/concerns/application_shared.rb:13:in `set_timezone'
 |   app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
 |   lib/middleware/catch_json_parse_errors.rb:9:in `call'

Related issues 1 (1 open0 closed)

Related to Foreman - Tracker #10022: Taxonomies related issuesNew04/05/2015

Actions
Actions #1

Updated by The Foreman Bot almost 8 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3571 added
Actions #2

Updated by Marek Hulán almost 8 years ago

Actions #3

Updated by Marek Hulán almost 8 years ago

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

Updated by Dominic Cleal almost 8 years ago

  • translation missing: en.field_release set to 161
Actions #5

Updated by Tomer Brisker about 7 years ago

  • Bugzilla link set to 1433677
Actions

Also available in: Atom PDF