mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
Bug #2620: Add various checks prior group creation
This commit is contained in:
1 parent
c4434a3bd3
commit
a270a1aa12
1 file changed
+13
@@ -85,6 +85,19 @@ module OpenNebula
|
||||
"Group Name not defined, aborting group create operation"
|
||||
end
|
||||
|
||||
if group_hash[:user][:name] and !group_hash[:admin_group]
|
||||
return -1,
|
||||
"Admin user defined but not admin group, " +
|
||||
"aborting group create operation"
|
||||
end
|
||||
|
||||
if group_hash[:user] and group_hash[:user][:name] and
|
||||
!group_hash[:user][:password]
|
||||
return -1,
|
||||
"Admin user password not defined, " +
|
||||
"aborting group create operation"
|
||||
end
|
||||
|
||||
rc_alloc = self.allocate(group_hash[:name])
|
||||
|
||||
if OpenNebula.is_error?(rc_alloc)
|
||||
|
||||
Reference in new issue
Block a user