[Ovirt-devel] [PATCH] move dialog fix.
Scott Seago
sseago at redhat.com
Tue Oct 7 14:30:16 UTC 2008
fixes a problem in the move (and add pool to smart pool) dialogs when permission was granted to the top level DirectoryPool rather than to individual HW pools. This code will be going away soon anyway, as we need to migrate the dialog tree view away from the legacy implementation to jguiditta's new tree code.
This fixes BZ 464273 and 464398.
Signed-off-by: Scott Seago <sseago at redhat.com>
---
src/app/controllers/hardware_controller.rb | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/src/app/controllers/hardware_controller.rb b/src/app/controllers/hardware_controller.rb
index 42ff9cb..9c04210 100644
--- a/src/app/controllers/hardware_controller.rb
+++ b/src/app/controllers/hardware_controller.rb
@@ -76,6 +76,14 @@ class HardwareController < PoolController
open_list = []
else
pools = Pool.list_for_user(get_login_user,Permission::PRIV_VIEW)
+ hw_root = HardwarePool.get_default_pool
+ if !(pools.include?(hw_root))
+ if pools.include?(DirectoryPool.get_directory_root)
+ pools << hw_root
+ elsif pools.include?(DirectoryPool.get_hardware_root)
+ pools << hw_root
+ end
+ end
current_id = params[:current_id]
if current_id
current_pool = Pool.find(current_id)
--
1.5.5.1
More information about the ovirt-devel
mailing list