search for: permissionerror

Displaying 8 results from an estimated 8 matches for "permissionerror".

2009 May 20
1
[PATCH server] don't add nil key to failures hash for PartialSuccessError handling.
..._controller.rb b/src/app/controllers/network_controller.rb index eca8fab..c477c56 100644 --- a/src/app/controllers/network_controller.rb +++ b/src/app/controllers/network_controller.rb @@ -81,7 +81,7 @@ class NetworkController < ApplicationController successes << @network # PermissionError and ActionError are expected rescue Exception => ex - failures[@network.nil? network_id : @network] = ex.message + failures[@network.nil? ? network_id : @network] = ex.message end end unless failures.empty? diff --git a/src/app/controllers/permission_control...
2009 Jun 29
0
[PATCH server] Add svc_vm_actions method to VmService.
...on-existant action is passed in, ActionError + # is thrown + def test_svc_vm_action_invalid_action + assert_raise ActionError do + svc_vm_action(vms(:production_httpd_vm).id, 'stop_vm', nil) + end + end + + # Ensure that if a user with the wrong permissions is passed in, + # PermissionError is thrown + def test_svc_vm_action_invalid_user + set_login_user('fred') + assert_raise PermissionError do + svc_vm_action(vms(:production_mysqld_vm).id, 'shutdown_vm', nil) + end + end + + # Ensure that if an invalid state change for a vm is requested, + # ActionE...
2009 Jun 29
2
One more fix
This resend includes the rebase, but fixes a problem I just noticed with nil/empty checks.
2009 Jun 29
2
Resend of Cloud UI/service patches
This is a resend of the 2-patch series from a week or so ago, needed to be rebased due to some commits on next
2009 Jun 22
2
Patch series for Cloud Vm Actions
The following two patches should be applied in the order: * [PATCH server] Add svc_vm_actions method to VmService. * [PATCH server] Cloud UI layer to initiate actions on vms. The service layer patch should work fine on its own (and not break anything), but cloud patch relies on service being there.
2009 May 15
0
[PATCH server] use service layer for Network controller.
...@network.errors.localize_error_messages.to_a } + def delete + network_ids = params[:network_ids].split(",") + successes = [] + failures = {} + network_ids.each do |network_id| + begin + svc_destroy(network_id) + successes << @network + rescue PermissionError => perm_error + failures[@network] = perm_error.message + rescue ActionError => ex + failures[@network] = ex.message + rescue Exception => ex + failures[@network] = ex.message + end end - end - - def delete - failed_networks = [] - netwo...
2009 Jul 07
0
[PATCH server] Update app to work with rails 2.3.2
...;_ovirt_session_id' - init_gettext "ovirt" - layout :choose_layout - - before_filter :is_logged_in, :get_help_section - - # General error handlers, must be in order from least specific - # to most specific - rescue_from Exception, :with => :handle_general_error - rescue_from PermissionError, :with => :handle_perm_error - rescue_from ActionError, :with => :handle_action_error - rescue_from PartialSuccessError, :with => :handle_partial_success_error - - def choose_layout - if(params[:component_layout]) - return (ENV["RAILS_ENV"] != "production")?&...
2009 Jul 20
9
Upgrade server to run on Rails 2.3.2/F11
Note that one of the 8 patches (#6) will be sent separately in reply to this email, as some of the replaced lines are too long, so git won't let me send the email. However, there is nothing wrong with that patch, and it should be applied in the sequence listed below. Note also that I assume this will be tested on a clean f11 install, rather than an upgrade of an existing ovirt server