1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

bug #2875: sunstone server crashes if oned is stopped while a sunstone session is active

This commit is contained in:
Daniel Molina 2014-10-06 15:40:19 +02:00 committed by Ruben S. Montero
parent 97ed7eaacf
commit 804a9336e3

View File

@ -65,14 +65,20 @@ class SunstoneViews
onec = $cloud_auth.client(user_name)
user = OpenNebula::User.new_with_id(OpenNebula::User::SELF, onec)
user.info
available = Array.new
rc = user.info
if OpenNebula.is_error?(rc)
return available
end
user.groups.each { |gid|
group = OpenNebula::Group.new_with_id(gid, onec)
group.info
rc = group.info
if OpenNebula.is_error?(rc)
return available.uniq
end
if group["TEMPLATE/SUNSTONE_VIEWS"]
views_array = group["TEMPLATE/SUNSTONE_VIEWS"].split(",")