-
Notifications
You must be signed in to change notification settings - Fork 356
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
Check selected Cloud Volumes for RBAC #770
Check selected Cloud Volumes for RBAC #770
Conversation
I'm not sure how to test this, is there a way to restrict some Cloud Volumes to some users? |
Checked commit romanblanco@451475a with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
Also: It seems strange to me, that there is 459 begin
460 valid_delete = volume.validate_delete_volume
461 if valid_delete[:available]
462 volumes_to_delete.push(volume)
463 else
464 add_flash(_("Couldn't initiate deletion of %{model} \"%{name}\": %{details}") % {
465 :model => ui_lookup(:table => 'cloud_volume'),
466 :name => volume.name,
467 :details => valid_delete[:message]}, :error)
468 end
469 rescue Excon::Error::Unauthorized => e
470 add_flash(_("Couldn't initiate deletion of %{model} \"%{name}\": %{details}") % {
471 :model => ui_lookup(:table => 'cloud_volume'),
472 :name => volume.name,
473 :details => e}, :error)
474 end when the 45 def validate_delete_volume
46 msg = validate_volume
47 return {:available => msg[:available], :message => msg[:message]} unless msg[:available]
48 if with_provider_object(&:status) == "in-use"
49 return validation_failed("Create Volume", "Can't delete volume that is in use.")
50 end
51 {:available => true, :message => nil}
52 end maybe I'm missing something, but it seems to me that the code can never get to the exception. ❓ |
@romanblanco I'm pretty sure I was getting |
@martinpovolny it's not remnant of that i think, it was added by @ZitaNemeckova in ManageIQ/manageiq@6ada628, but I believe I can remove it now. |
Check selected Cloud Volumes for RBAC (cherry picked from commit 690aed4)
Fine backport details:
|
Storage -> Block Storage -> Volumes