mirror of
https://github.com/OpenNebula/one.git
synced 2025-01-24 02:03:52 +03:00
Feature #3471: Rename vdcadmin view to groupadmin
This commit is contained in:
parent
195270b9d6
commit
22403dbf5c
@ -1526,8 +1526,8 @@ SUNSTONE_ETC_VIEW_FILES="src/sunstone/etc/sunstone-views/admin.yaml \
|
||||
src/sunstone/etc/sunstone-views/user.yaml \
|
||||
src/sunstone/etc/sunstone-views/cloud.yaml \
|
||||
src/sunstone/etc/sunstone-views/cloud_vcenter.yaml \
|
||||
src/sunstone/etc/sunstone-views/vdcadmin.yaml \
|
||||
src/sunstone/etc/sunstone-views/vcenter.yaml"
|
||||
src/sunstone/etc/sunstone-views/groupadmin.yaml \
|
||||
src/sunstone/etc/sunstone-views/vcenter.yaml"
|
||||
|
||||
SUNSTONE_MODELS_FILES="src/sunstone/models/OpenNebulaJSON.rb \
|
||||
src/sunstone/models/SunstoneServer.rb \
|
||||
|
@ -39,7 +39,7 @@ module OpenNebula
|
||||
|
||||
# The default view for group and group admins, must be defined in
|
||||
# sunstone_views.yaml
|
||||
GROUP_ADMIN_SUNSTONE_VIEWS = "vdcadmin"
|
||||
GROUP_ADMIN_SUNSTONE_VIEWS = "groupadmin"
|
||||
|
||||
# Creates a Group description with just its identifier
|
||||
# this method should be used to create plain Group objects.
|
||||
@ -299,7 +299,7 @@ module OpenNebula
|
||||
return rc
|
||||
end
|
||||
|
||||
# Set the default admin view to vdcadmin
|
||||
# Set the default admin view to groupadmin
|
||||
group_admin.update("DEFAULT_VIEW=#{GROUP_ADMIN_SUNSTONE_VIEWS}", true)
|
||||
|
||||
#Create admin group acls
|
||||
|
@ -69,6 +69,23 @@ EOT
|
||||
|
||||
doc = Nokogiri::XML(row[:body]){|c| c.default_xml.noblanks}
|
||||
|
||||
["GROUP_ADMIN_VIEWS", "SUNSTONE_VIEWS", "DEFAULT_VIEW"].each do |elem_name|
|
||||
elem = doc.at_xpath("/GROUP/TEMPLATE/#{elem_name}")
|
||||
|
||||
if (!elem.nil?)
|
||||
elem.remove
|
||||
|
||||
# The cleaner doc.create_cdata(txt) is not supported in
|
||||
# old versions of nokogiri
|
||||
|
||||
doc.at_xpath("/GROUP/TEMPLATE").add_child(
|
||||
doc.create_element(elem_name)).
|
||||
add_child(Nokogiri::XML::CDATA.new(
|
||||
doc,
|
||||
elem.text.gsub("vdcadmin", "groupadmin")))
|
||||
end
|
||||
end
|
||||
|
||||
res_providers = doc.xpath("/GROUP/RESOURCE_PROVIDER")
|
||||
|
||||
res_providers.each do |provider|
|
||||
|
@ -28,7 +28,7 @@ available_tabs:
|
||||
groups:
|
||||
oneadmin:
|
||||
- admin
|
||||
- vdcadmin
|
||||
- groupadmin
|
||||
- user
|
||||
- cloud
|
||||
- vcenter
|
||||
|
Loading…
x
Reference in New Issue
Block a user