Project

General

Profile

Bug #5553

Filter create/edit breaks if the resource type does not have a corresponding controller with 'autocomplete_search'

Added by Eric Helms almost 5 years ago. Updated 9 months ago.

Status:
Closed
Priority:
Normal
Category:
Web Interface
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

If a permission set is created and specifies a resource type that does not contain an autocomplete route, the permissions aren't loaded by the UI and leaves the user in a weird broken state that they are unaware of. The line that leads to this is - https://github.com/theforeman/foreman/blob/develop/app/helpers/filters_helper.rb#L14 which throws a backend error since the first argument is nil.


Related issues

Has duplicate Foreman - Bug #5578: Cant set permissions on specific resource types Closed2014-05-05
Copied to Foreman - Feature #5753: Allow customisation of autocomplete_search path for resources in filter create/editClosed2014-05-02

Associated revisions

Revision 0c82622c (diff)
Added by Dmitri Dolguikh almost 5 years ago

fixes #5553: FiltersHelper#search_path returns an empty string for unrecognized resources

Revision baddf3e3 (diff)
Added by Dmitri Dolguikh almost 5 years ago

fixes #5553: FiltersHelper#search_path returns an empty string for unrecognized resources

(cherry picked from commit 0c82622ce4cde6ac64d833d1fd96e52339ab60b0)

History

#1 Updated by Dominic Cleal almost 5 years ago

  • Category set to Web Interface

#2 Updated by Eric Helms almost 5 years ago

Backtrace:

NoMethodError (undefined method `+' for nil:NilClass):
app/helpers/filters_helper.rb:16:in `search_path'
app/controllers/permissions_controller.rb:8:in `index'
actionpack (3.2.17) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.2.17) lib/abstract_controller/base.rb:167:in `process_action'
actionpack (3.2.17) lib/action_controller/metal/rendering.rb:10:in `process_action'

#3 Updated by Dmitri Dolguikh almost 5 years ago

  • Has duplicate Bug #5578: Cant set permissions on specific resource types added

#4 Updated by Dmitri Dolguikh almost 5 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 1.8.3

#5 Updated by Dominic Cleal almost 5 years ago

  • Copied to Feature #5753: Allow customisation of autocomplete_search path for resources in filter create/edit added

#6 Updated by Dominic Cleal almost 5 years ago

  • Legacy Backlogs Release (now unused) set to 16

#7 Updated by Anonymous almost 5 years ago

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

#8 Updated by Bryan Kearney almost 5 years ago

  • Bugzilla link set to https://bugzilla.redhat.com/show_bug.cgi?id=1107710

Also available in: Atom PDF