Role.getParentRoles()

The method returns all the immediate parent roles.

Availability

IBM® Security Identity Manager 6.x

IBM Security Identity Manager 7.0.

Synopsis
Role.getParentRoles()
Arguments
None
Description
This method is defined on the Role object and returns an array of roles. The array contains the immediate parent roles of the role. The method returns an empty array if no parent role exists.
Usage
var role = new Role(roleDN);
//get parent roles
var roleList = role.getParentRoles();
if (roleList.length == 0) {
    Enrole.log("script", "There is no parent role of role: " + role.name);
    return;
}

// print out role names.
for (var i=0; i < roleList.length; i++) {
    var r = roleList[i];
    Enrole.log("script","role name: "+ r.name);
}