-
Notifications
You must be signed in to change notification settings - Fork 357
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 multi-target Set Ownership #5064
Conversation
Aaand added a spec: (fails without the fix:
) |
Since #1578, when doing Set Ownership over multiple items: * set user to a User, set group to dont-change ... user gets set to User, and group gets reset to nil * set group to a Group, set user to dont-change ... group gets set to Group, and user gets reset to nil This makes sure we don't reset groups or users unless asked to. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1657260
Checked commits https://github.com/himdel/manageiq-ui-classic/compare/b5c08fde841963ee07b663c1b071f99ee1cb1b0d~...3d8c0ef5f855e9da9bed443327f4198f162cf289 with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 spec/controllers/vm_infra_controller_spec.rb
|
(specs should go green after #5065) |
Tested in UI. Fixes the issue. |
Fix multi-target Set Ownership (cherry picked from commit 91bacce) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1657260
Hammer backport details:
|
Fix multi-target Set Ownership (cherry picked from commit 91bacce) Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1657939
Gaprindashvili backport details:
|
Since #1578, when doing Set Ownership over multiple items:
set user to a User, set group to dont-change
... user gets set to User, and group gets reset to nil
set group to a Group, set user to dont-change
... group gets set to Group, and user gets reset to nil
This makes sure we don't reset groups or users unless asked to.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1657260
The difference is that...
Vm.set_ownership([123], {:user => (User)}
only changes user,but
Vm.set_ownership([123], {:user => (User), :group => nil}
updates both.