Bug 1262759

Summary: Unhandled Exception when logging in with Tasks permissions
Product: Red Hat CloudForms Management Engine Reporter: Pete Savage <psavage>
Component: UI - OPSAssignee: Roman Blanco <rblanco>
Status: CLOSED CURRENTRELEASE QA Contact: Pete Savage <psavage>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.4.0CC: hkataria, jhardy, mpovolny, obarenbo, simaishi
Target Milestone: GA   
Target Release: 5.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: rbac:ui:error
Fixed In Version: 5.6.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-22 20:01:21 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pete Savage 2015-09-14 09:29:58 UTC
Description of problem: Unhandled Exception when logging in with Tasks permissions


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Add a new role with no vm and template restriction, but with the permissions as follows: Everything -> Configure -> Tasks -> View
2. Add a new group and assign it the role
3. Add a new user and put it in the group in Step 3
4. Log in as the new user

Actual results: Unhandled Exception


Expected results: User should log in


Additional info:
[----] I, [2015-09-14T05:25:25.117131 #2969:815eac]  INFO -- : Started GET "/configuration/index?jobs_tab=alltasks" for 127.0.0.1 at 2015-09-14 05:25:25 -0400
[----] I, [2015-09-14T05:25:25.120430 #2969:815eac]  INFO -- : Processing by ConfigurationController#index as HTML
[----] I, [2015-09-14T05:25:25.120565 #2969:815eac]  INFO -- :   Parameters: {"jobs_tab"=>"alltasks"}
[----] F, [2015-09-14T05:25:25.399567 #2969:815eac] FATAL -- : Error caught: [NoMethodError] undefined method `[]' for nil:NilClass
/var/www/miq/vmdb/app/controllers/configuration_controller.rb:808:in `set_form_vars'
/var/www/miq/vmdb/app/controllers/configuration_controller.rb:83:in `edit'
/var/www/miq/vmdb/app/controllers/configuration_controller.rb:43:in `index'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/base.rb:167:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/rendering.rb:10:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/callbacks.rb:18:in `block in process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:568:in `_run__704294065916715577__process_action__4205043876178554388__callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/callbacks.rb:17:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/rescue.rb:29:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/notifications.rb:123:in `block in instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/notifications.rb:123:in `instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/instrumentation.rb:29:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/params_wrapper.rb:207:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/base.rb:121:in `process'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/abstract_controller/rendering.rb:45:in `process'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal.rb:203:in `dispatch'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal/rack_delegation.rb:14:in `dispatch'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_controller/metal.rb:246:in `block in action'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/routing/route_set.rb:73:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/routing/route_set.rb:73:in `dispatch'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/routing/route_set.rb:36:in `call'
/opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:68:in `block in call'
/opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `each'
/opt/rh/cfme-gemset/gems/journey-1.0.4/lib/journey/router.rb:56:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/routing/route_set.rb:608:in `call'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:136:in `forward'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:245:in `fetch'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:185:in `lookup'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:66:in `call!'
/opt/rh/cfme-gemset/gems/rack-cache-1.2/lib/rack/cache/context.rb:51:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/best_standards_support.rb:17:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.7/lib/rack/etag.rb:23:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.7/lib/rack/conditionalget.rb:25:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/head.rb:14:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/params_parser.rb:21:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/flash.rb:242:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:210:in `context'
/opt/rh/cfme-gemset/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:205:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/cookies.rb:341:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/query_cache.rb:64:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activerecord/lib/active_record/connection_adapters/abstract/connection_pool.rb:479:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:405:in `_run__3289436200236178709__call__498472870654745993__callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:405:in `__run_callback'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:385:in `_run_call_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/callbacks.rb:81:in `run_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/callbacks.rb:27:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/remote_ip.rb:31:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb:16:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:56:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/rack/logger.rb:32:in `call_app'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/rack/logger.rb:18:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/request_id.rb:22:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.7/lib/rack/methodoverride.rb:21:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.7/lib/rack/runtime.rb:17:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/activesupport/lib/active_support/cache/strategy/local_cache.rb:72:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.7/lib/rack/lock.rb:15:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/actionpack/lib/action_dispatch/middleware/static.rb:63:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/engine.rb:484:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/application.rb:231:in `call'
/opt/rh/cfme-gemset/gems/rack-1.4.7/lib/rack/content_length.rb:14:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/rack/log_tailer.rb:17:in `call'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:80:in `block in pre_process'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:78:in `catch'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:78:in `pre_process'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:53:in `process'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/connection.rb:38:in `receive_data'
/opt/rh/ruby200/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run_machine'
/opt/rh/ruby200/root/usr/share/gems/gems/eventmachine-1.0.7/lib/eventmachine.rb:187:in `run'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/backends/base.rb:61:in `start'
/opt/rh/ruby200/root/usr/share/gems/gems/thin-1.3.1/lib/thin/server.rb:159:in `start'
/opt/rh/cfme-gemset/gems/rack-1.4.7/lib/rack/handler/thin.rb:13:in `run'
/opt/rh/cfme-gemset/gems/rack-1.4.7/lib/rack/server.rb:268:in `start'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands/server.rb:70:in `start'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:55:in `block in <top (required)>'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:50:in `tap'
/opt/rh/cfme-gemset/bundler/gems/rails-4842a8377644/railties/lib/rails/commands.rb:50:in `<top (required)>'
script/rails:6:in `require'
script/rails:6:in `<main>'

Comment 3 CFME Bot 2015-11-09 21:20:16 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/2fb84859f06134dcd76b4f5d7fd7db9a2c7b9d1a

commit 2fb84859f06134dcd76b4f5d7fd7db9a2c7b9d1a
Author:     Roman Blanco <rblanco>
AuthorDate: Wed Nov 4 21:35:54 2015 +0100
Commit:     Roman Blanco <rblanco>
CommitDate: Mon Nov 9 18:21:25 2015 +0100

    Fix logging in user with restricted permissions
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1262759

 db/fixtures/miq_shortcuts.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 5 Pete Savage 2017-02-22 20:01:04 UTC
Verified in 5.6.4