RoleSearch.searchByName()
The method searches for a role by a name.
- Availability
-
IBM® Tivoli® Identity Manager 4.x
IBM Tivoli Identity Manager 5.x
IBM Security Identity Manager 6.x
IBM Security Identity Manager 7.0.
- Synopsis
RoleSearch.searchByName(name)
- Arguments
-
- name
- The role name to use as the basis for the search.
- Returns
- Array of
DirectoryObjects
that represents a role.
- Description
- Given the name of a role, locate the Role entity. Will return
null
if there is not exactly one matching role. - Usage
-
// Given the name of a role, see if it exists and log its // description var roles = (new RoleSearch()).searchByName("testRole"); if (roles.length >= 1) { if (roles[0].getProperty("errolename")[0] == "testRole") { Enrole.log("script", "The Role "+ roles[0].getProperty("errolename")[0] + "has Description :" + roles[0].getProperty("description")[0]); } }