Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix displaying user detail page #3720

Merged

Conversation

ZitaNemeckova
Copy link
Contributor

Configuration -> Access Control -> Select User that has no Groups
Before:

F, [2018-04-04T16:52:35.609332 #65220] FATAL -- : Error caught: [ActionView::Template::Error] undefined method `[]' for nil:NilClass
/Users/zita/Desktop/ManageIQ/manageiq-ui-classic/app/views/ops/_rbac_user_details.html.haml:134:in `___sers_zita__esktop__anage___manageiq_ui_classic_app_views_ops__rbac_user_details_html_haml___1940073322298559570_70282346906420'
/usr/local/lib/ruby/gems/2.3.0/gems/actionview-5.0.7/lib/action_view/template.rb:159:in `block in render'
/usr/local/lib/ruby/gems/2.3.0/gems/activesupport-5.0.7/lib/active_support/notifications.rb:166:in `instrument'
/usr/local/lib/ruby/gems/2.3.0/gems/actionview-5.0.7/lib/action_view/template.rb:354:in `instrument'
/usr/local/lib/ruby/gems/2.3.0/gems/actionview-5.0.7/lib/action_view/template.rb:157:in `render'

After:
It works

@miq-bot add_label bug, gaprindashvili/yes

@miq-bot
Copy link
Member

miq-bot commented Apr 4, 2018

Checked commit ZitaNemeckova@1f129c2 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 1 offense detected

**

  • 💣 💥 🔥 🚒 - Linter/Haml - Linter::Haml STDERR:
warning: parser/current is loading parser/ruby23, which recognizes
warning: 2.3.6-compliant syntax, but you are running 2.3.3.
warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri.

@mzazrivec
Copy link
Contributor

@ZitaNemeckova How do I go about creating a user without a group?

@ZitaNemeckova
Copy link
Contributor Author

ZitaNemeckova commented Apr 5, 2018

@mzazrivec I think you shouldn't. I got few when I was working on #3714 and started to see error in description. So removing groups via console should work for testing it.

It's "just in case" fix. Pretty much prevents to go to else branch that looks at @edit because groups == [].

@martinpovolny martinpovolny self-assigned this Apr 6, 2018
@martinpovolny martinpovolny added this to the Sprint 83 Ending Apr 9, 2018 milestone Apr 6, 2018
@martinpovolny martinpovolny merged commit 3e672df into ManageIQ:master Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants