Person.updateRoleAssignmentData()
The method updates a person with the role assignment attribute value changes that are
defined in the set of RoleAssignmentObjects
. It does not directly change data in
the data source, but updates (in memory) the data inside the person object.
- Availability
-
IBM® Security Identity Manager 6.x
IBM Security Identity Manager 7.0.
- Synopsis
person.updateRoleAssignmentData(RoleAssignmentObject [] roleAssignmentObject)
- Arguments
-
- roleAssignmentObject
- A list of
roleAssignmentObjects
that contains the role assignment attribute value change set to be applied.
- Description
- This method is defined on the Person object. It updates a person with the role assignment
attribute value changes that are defined in the set of
RoleAssignmentObjects
. - Usage
-
//The script is used in a workflow, in which Entity is a person object. var person = Entity.get(); var roleDNs = person.getProperty("erroles"); if(roleDNs.length == 0) { Enrole.log("script", person.name + " does not have any role"); return; } //construct a new RoleAssignmentObject var assignmentObj = new RoleAssignmentObject(roleDNs[0], roleDNs[0]); assignmentObj.addProperty("attr_3", ["newv1", "newv2"]); person.updateRoleAssignmentData([assignmentObj]);