我正在使用IBM WebSphere 7.0。
我想将CORBA 命名服务组 映射EVERYONE
到角色。如何使用Jython或JACL做到这一点?请提供一些线索、代码片段或指向大量Jython文档的链接。Cos Naming Write
Cos Naming Read
这不是很安全,所以我假设您这样做是为了开发或在某种防火墙后面。这个 Jacl 片段应该做你想做的事:
# Loop over all role assignments
foreach roleAssignmentExt [$AdminConfig list RoleAssignmentExt] {
set role [$AdminConfig showAttribute $roleAssignmentExt role]
set roleName [$AdminConfig showAttribute $role roleName]
# Look for the interesting roles.
if {$roleName == "CosNamingWrite" || $roleName == "CosNamingRead"} {
# Create an assignment of Everyone isn't already assigned.
set everyoneRoles [$AdminConfig list EveryoneExt $roleAssignmentExt]
if {[string length $everyoneRoles] == 0} {
puts "Adding EveryoneExt to $roleAssignmentExt"
$AdminConfig create EveryoneExt $roleAssignmentExt {}
}
}
}