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

Use admin user in get_user for service show if user's deleted #18663

Merged

Conversation

d-m-u
Copy link
Contributor

@d-m-u d-m-u commented Apr 17, 2019

If users are deleted, the SUI can break on service viewing. This allows us to resort to admin if the service user can't be found.

Yuri wants this opened for https://bugzilla.redhat.com/show_bug.cgi?id=1677744.

@d-m-u
Copy link
Contributor Author

d-m-u commented Apr 17, 2019

@miq-bot assign @gtanzillo

@d-m-u
Copy link
Contributor Author

d-m-u commented Apr 17, 2019

@miq-bot add_label bug

@d-m-u
Copy link
Contributor Author

d-m-u commented Apr 17, 2019

@miq-bot add_label hammer/yes

@d-m-u
Copy link
Contributor Author

d-m-u commented Apr 17, 2019

@miq-bot add_reviewer @yrudman

@d-m-u d-m-u changed the title Add admin user if user can't be found Use admin user in get_user for service show if user's deleted Apr 17, 2019
@d-m-u d-m-u force-pushed the change_get_user_to_account_for_user_deletion branch from b895347 to 0725b15 Compare April 17, 2019 20:02
@yrudman
Copy link
Contributor

yrudman commented Apr 18, 2019

@tinaafitz Tina, could you confirm that it is ok to use admin user in miq_request if original user was deleted

@tinaafitz
Copy link
Member

tinaafitz commented Apr 18, 2019

@yrudman I think it would be better to use super_admin.
https://github.com/ManageIQ/manageiq/blob/master/app/models/user.rb#L254
Thoughts?

@gtanzillo
Copy link
Member

@d-m-u This looks good once you make the change Tina and I suggested. Need to add tests as well.

@d-m-u d-m-u force-pushed the change_get_user_to_account_for_user_deletion branch from 0725b15 to 66c968e Compare April 18, 2019 19:20
@d-m-u d-m-u force-pushed the change_get_user_to_account_for_user_deletion branch from 66c968e to bfa2892 Compare April 18, 2019 19:27
@miq-bot
Copy link
Member

miq-bot commented Apr 18, 2019

Checked commit d-m-u@bfa2892 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
2 files checked, 0 offenses detected
Everything looks fine. 🏆

@d-m-u
Copy link
Contributor Author

d-m-u commented Apr 18, 2019

@tinaafitz @gtanzillo please take another look

@gtanzillo gtanzillo added the bug label Apr 18, 2019
@gtanzillo gtanzillo added this to the Sprint 110 Ending Apr 29, 2019 milestone Apr 18, 2019
@gtanzillo gtanzillo merged commit ab9a0ba into ManageIQ:master Apr 18, 2019
@d-m-u
Copy link
Contributor Author

d-m-u commented Apr 18, 2019

@miq-bot add_label hammer/yes

@d-m-u d-m-u deleted the change_get_user_to_account_for_user_deletion branch April 22, 2019 11:36
simaishi pushed a commit that referenced this pull request Apr 23, 2019
…ser_deletion

Use admin user in get_user for service show if user's deleted

(cherry picked from commit ab9a0ba)

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1702080
@simaishi
Copy link
Contributor

Hammer backport details:

$ git log -1
commit c9e4cebdbd6a52dcb6bbff547ef65329f77ff8fe
Author: Gregg Tanzillo <[email protected]>
Date:   Thu Apr 18 15:56:09 2019 -0400

    Merge pull request #18663 from d-m-u/change_get_user_to_account_for_user_deletion
    
    Use admin user in get_user for service show if user's deleted
    
    (cherry picked from commit ab9a0ba37d770b8b518367cbd2cfc64f80624939)
    
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1702080

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants