1

我正在使用IBM WebSphere 7.0

我想将CORBA 命名服务组 映射EVERYONE到角色。如何使用JythonJACL做到这一点?请提供一些线索、代码片段或指向大量Jython文档的链接。Cos Naming WriteCos Naming Read

4

1 回答 1

2

这不是很安全,所以我假设您这样做是为了开发或在某种防火墙后面。这个 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 {}
    }
  }
}
于 2012-03-20T04:31:35.320 回答