Bug #5553

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

Added by Eric Helms over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Dmitri Dolguikh
Category:Web Interface
Target version:Sprint 23
Difficulty: Bugzilla link:1107710
Found in release: Pull request:
Story points-
Velocity based estimate-
Release1.5.1Release relationshipAuto

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

Duplicated by Foreman - Bug #5578: Cant set permissions on specific resource types Closed 05/05/2014
Copied to Foreman - Feature #5753: Allow customisation of autocomplete_search path for resou... Closed 05/02/2014

Associated revisions

Revision 0c82622c
Added by Dmitri Dolguikh over 3 years ago

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

Revision baddf3e3
Added by Dmitri Dolguikh over 3 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 over 3 years ago

  • Category set to Web Interface

#2 Updated by Eric Helms over 3 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 over 3 years ago

  • Duplicated by Bug #5578: Cant set permissions on specific resource types added

#4 Updated by Dmitri Dolguikh over 3 years ago

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

#5 Updated by Dominic Cleal over 3 years ago

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

#6 Updated by Dominic Cleal over 3 years ago

  • Release set to 1.5.1

#7 Updated by Anonymous over 3 years ago

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

#8 Updated by Bryan Kearney over 3 years ago

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

Also available in: Atom PDF