Bug #5396
closedCreating Role filter with all 'Image' permissions breaks the ability to edit the filter
Description
1. Create a Role
2. New Filter
3. Select 'Image' for resource type
4. Add all permissions for Image
5. click 'Submit'
6. Click 'Edit' on the new filter for images
7. See below error output
Error Output:
NoMethodError in Filters#edit
Showing /home/ehelms/workspace/foreman/app/views/filters/_form.html.erb where line #48 raised:
undefined method `images_path' for #<#<Class:0x007fef8dd368a8>:0x007fef8dffcc40>
Extracted source (around line #48):
45:
46: <%= autocomplete_f f, :search,
47: :disabled => f.object.unlimited?,
48: :path => resource_path(f.object.resource_type), :control_group_id => 'search_group' %>
49: </div>
50: </div>
51:
Trace of template inclusion: app/views/filters/edit.html.erb
Rails.root: /home/ehelms/workspace/foreman
Application Trace | Framework Trace | Full Trace
app/helpers/filters_helper.rb:28:in `resource_path'
app/views/filters/_form.html.erb:48:in `block in _fabc93ac24626208bc17ef72de5df991'
app/helpers/layout_helper.rb:248:in `form_for'
app/views/filters/_form.html.erb:3:in `_fabc93ac24626208bc17ef72de5df991'
app/views/filters/edit.html.erb:3:in `_1055897e17fa325e0397831313262eb9'
app/models/concerns/foreman/thread_session.rb:33:in `clear_thread'
lib/middleware/catch_json_parse_errors.rb:9:in `call'
Request
Parameters:
{"role_id"=>"10",
"id"=>"104"}
Updated by Dominic Cleal over 10 years ago
- Blocks Tracker #4552: New permissions/authorization system issues added
Updated by Dominic Cleal over 10 years ago
- Category set to Users, Roles and Permissions
Updated by Marek Hulán over 10 years ago
- Status changed from New to Need more information
I think this is already fixed by #4960 in 127958bd7f3 could you please retest? I was not able to reproduce on my instance.
Updated by Tomer Brisker almost 9 years ago
- Status changed from Need more information to Resolved
Seems to have been fixed. Closing.