Actions
Bug #15278
closedOrganization/Location edit fails for user with granular filters on taxable resources
Status:
Closed
Priority:
Normal
Assignee:
Category:
Organizations and Locations
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
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'
Updated by The Foreman Bot over 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3571 added
Updated by Marek Hulán over 8 years ago
- Related to Tracker #10022: Taxonomies related issues added
Updated by Marek Hulán over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset f358e67675391aaf8151f6c55227d3a6919738a9.
Updated by Dominic Cleal over 8 years ago
- Translation missing: en.field_release set to 161
Actions