mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 11:52:37 +09:00
SECGROUP was also missing from the java oca
This commit is contained in:
1 parent
d03fdf339c
commit
7ed6071ffd
6 files changed
+32
-18
No files matched your search
+1
-1
@@ -233,7 +233,7 @@ bool AclRule::malformed(string& error_str) const
|
||||
oss << "[resource] type is missing";
|
||||
}
|
||||
|
||||
if ( (resource & 0xFFFE000000000000LL) != 0 )
|
||||
if ( (resource & 0xFFFC000000000000LL) != 0 )
|
||||
{
|
||||
if ( error )
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:size: 8
|
||||
:right: true
|
||||
|
||||
:RES_VHNIUTGDCOZS:
|
||||
:RES_VHNIUTGDCOZSv:
|
||||
:desc: Which resource the rule applies to
|
||||
:size: 16
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
:default:
|
||||
- :ID
|
||||
- :USER
|
||||
- :RES_VHNIUTGDCOZS
|
||||
- :RES_VHNIUTGDCOZSv
|
||||
- :RID
|
||||
- :OPE_UMAC
|
||||
- :ZONE
|
||||
@@ -44,7 +44,7 @@ private
|
||||
def self.resource_mask(str)
|
||||
resource_type=str.split("/")[0]
|
||||
|
||||
mask = "------------"
|
||||
mask = "-------------"
|
||||
|
||||
resource_type.split("+").each{|type|
|
||||
case type
|
||||
@@ -72,6 +72,8 @@ private
|
||||
mask[10] = "Z"
|
||||
when "SECGROUP"
|
||||
mask[11] = "S"
|
||||
when "VDC"
|
||||
mask[12] = "v"
|
||||
end
|
||||
}
|
||||
mask
|
||||
@@ -111,7 +113,7 @@ private
|
||||
d['STRING'].split(" ")[0]
|
||||
end
|
||||
|
||||
column :RES_VHNIUTGDCOZS, "Resource to which the rule applies",
|
||||
column :RES_VHNIUTGDCOZSv, "Resource to which the rule applies",
|
||||
:size => 16 do |d|
|
||||
OneAclHelper::resource_mask d['STRING'].split(" ")[1]
|
||||
end
|
||||
@@ -129,7 +131,7 @@ private
|
||||
OneAclHelper::right_mask d['STRING'].split(" ")[2]
|
||||
end
|
||||
|
||||
default :ID, :USER, :RES_VHNIUTGDCOZS, :RID, :OPE_UMAC, :ZONE
|
||||
default :ID, :USER, :RES_VHNIUTGDCOZSv, :RID, :OPE_UMAC, :ZONE
|
||||
end
|
||||
|
||||
table
|
||||
|
||||
@@ -69,6 +69,8 @@ public class Acl extends PoolElement{
|
||||
tmpResources.put("CLUSTER" , 0x0000200000000000L);
|
||||
tmpResources.put("DOCUMENT" , 0x0000400000000000L);
|
||||
tmpResources.put("ZONE" , 0x0000800000000000L);
|
||||
tmpResources.put("SECGROUP" , 0x0001000000000000L);
|
||||
tmpResources.put("VDC" , 0x0002000000000000L);
|
||||
|
||||
RESOURCES = Collections.unmodifiableMap(tmpResources);
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ module OpenNebula
|
||||
# GROUP
|
||||
# ACL
|
||||
# SECGROUP
|
||||
# VDC
|
||||
# RIGHTS -> + separated list
|
||||
# USE
|
||||
# MANAGE
|
||||
@@ -48,18 +49,19 @@ module OpenNebula
|
||||
|
||||
RESOURCES =
|
||||
{
|
||||
"VM" => 0x1000000000,
|
||||
"HOST" => 0x2000000000,
|
||||
"NET" => 0x4000000000,
|
||||
"IMAGE" => 0x8000000000,
|
||||
"USER" => 0x10000000000,
|
||||
"TEMPLATE" => 0x20000000000,
|
||||
"GROUP" => 0x40000000000,
|
||||
"DATASTORE" => 0x100000000000,
|
||||
"CLUSTER" => 0x200000000000,
|
||||
"DOCUMENT" => 0x400000000000,
|
||||
"ZONE" => 0x800000000000,
|
||||
"SECGROUP" => 0x1000000000000
|
||||
"VM" => 0x1000000000,
|
||||
"HOST" => 0x2000000000,
|
||||
"NET" => 0x4000000000,
|
||||
"IMAGE" => 0x8000000000,
|
||||
"USER" => 0x10000000000,
|
||||
"TEMPLATE" => 0x20000000000,
|
||||
"GROUP" => 0x40000000000,
|
||||
"DATASTORE" => 0x100000000000,
|
||||
"CLUSTER" => 0x200000000000,
|
||||
"DOCUMENT" => 0x400000000000,
|
||||
"ZONE" => 0x800000000000,
|
||||
"SECGROUP" => 0x1000000000000,
|
||||
"VDC" => 0x2000000000000
|
||||
}
|
||||
|
||||
RIGHTS =
|
||||
|
||||
@@ -106,6 +106,11 @@ var create_acl_tmpl =
|
||||
<input type="checkbox" id="res_secgroup" name="res_secgroup" class="resource_cb" value="SECGROUP"><label for="res_secgroup">'+tr("Security Groups")+'</label>\
|
||||
</div>\
|
||||
</div>\
|
||||
<div class="row">\
|
||||
<div class="large-3 columns">\
|
||||
<input type="checkbox" id="res_vdc" name="res_vdc" class="resource_cb" value="VDC"><label for="res_vdc">'+tr("VDCs")+'</label>\
|
||||
</div>\
|
||||
</div>\
|
||||
</fieldset>\
|
||||
<fieldset>\
|
||||
<legend>'+tr("Resource subset")+'</legend>\
|
||||
@@ -408,6 +413,9 @@ function parseAclString(string) {
|
||||
case "SECGROUP":
|
||||
resources_str+=tr("Security Groups")+", ";
|
||||
break;
|
||||
case "VDC":
|
||||
resources_str+=tr("VDCs")+", ";
|
||||
break;
|
||||
};
|
||||
};
|
||||
//remove ", " from end
|
||||
|
||||
Reference in new issue
Block a user