mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
Fix oca incompatibility with ruby 1.8.5
(cherry picked from commit 1a864ef3f1)
This commit is contained in:
1 parent
d941d20ef3
commit
bf5af7d060
1 file changed
+5
-1
@@ -127,7 +127,11 @@ module OpenNebula
|
||||
|
||||
# Returns whether or not the user with id 'uid' is part of this group
|
||||
def contains(uid)
|
||||
return self["USERS/ID[.=#{uid}]"] != nil
|
||||
# This doesn't work in ruby 1.8.5
|
||||
# return self["USERS/ID[.=#{uid}]"] != nil
|
||||
|
||||
id_array = retrieve_elements('USERS/ID')
|
||||
return id_array != nil && id_array.include?(uid.to_s)
|
||||
end
|
||||
|
||||
# Returns an array with the numeric user ids
|
||||
|
||||
Reference in new issue
Block a user