I want to get Access name like Universe User on SDK. How can I find it?
I try it on universeSecInfo.getEffectivePrincipals but it does not contain that info.
thanks in advance
eym (BOB member since 2013-05-13)
I want to get Access name like Universe User on SDK. How can I find it?
I try it on universeSecInfo.getEffectivePrincipals but it does not contain that info.
thanks in advance
eym (BOB member since 2013-05-13)
It is called role. You can try the following code:
ISecurityInfo2 securityInfo = infoObject.getSecurityInfo2();
IExplicitPrincipals explicitPrincipals = securityInfo.getExplicitPrincipals();
Iterator<?> itor = explicitPrincipals.iterator();
while (itor.hasNext())
{
IExplicitPrincipal explicitPrincipal = (IExplicitPrincipal)itor.next();
String explicitPrincipalName = explicitPrincipal.getName();
IExplicitRoles roles = explicitPrincipal.getRoles();
for (Iterator<?> iter = roles.iterator(); iter.hasNext();) {
IExplicitRole role = (IExplicitRole)iter.next();
System.out.println("[" + explicitPrincipalName + "] has role [" + role.getTitle() + "]");
}
}
Dmytro Bukhantsov (BOB member since 2011-10-14)