Roles Actions
Deletes a Portal role.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Portal connection definition |
roleDNOrID* | text, expression, variable | the DN or IdautoID of the role to delete |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
deleted = deletePortalRole(connection, "CN=My Role,OU=groups,DC=example,DC=com")
Obtains the DN or IdAutoId of all members in the listed Role.
Property | Value | Description |
---|---|---|
connection* | expression, variable | The Identity Portal connection definition |
roleDNsORId* | text, expression, variable | The DN or the IdAutoID of the user |
returnVariable | expression, variable | Returns an array of Role DNs or IdAutoIDs |
Initiate import of a particular new Portal role.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Portal connection definition |
roleId* | text, expression, variable | the IdautoID of the role to import |
syncAfterImport* | boolean, expression, variable | whether the imported role should be synced after importing |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
groupId = getIdautoIDForGroup(connection, "CN=My New Group,OU=groups,DC=example,DC=com") success = importPortalRole(connection, groupId, true)
Initiate import of new Portal roles.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Portal connection definition |
syncAfterImport* | boolean, expression, variable | whether imported roles should be synced after the import completes |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
success = importPortalRoles(connection, true)
Property | Value | Description |
---|---|---|
connection* | expression, variable | The Identity Portal connection definition |
userDNorID* | text, expression, variable | The DN or the IdAutoID of the user |
roleDNsORIds* | expression, variable | An array of Role DNs or IdAutoIDs |
returnVariable | expression, variable | Returns true or false. |
Determines whether a listed user is a member of any of queried roles.
Property | Value | Description |
---|---|---|
connection* | expression, variable | The Identity Portal connection definition |
userDNorID* | text, expression, variable | The DN or the IdAutoID of the user |
roleDNsORIds* | expression, variable | An array of Role DNs or IdAutoIDs |
returnVariable | expression, variable | Returns true or false. |
Example
conn = definePortalConnection("https://localhost:8443", "username", <Password>, true) array = createArray(6) insertArrayItem(array, 0, "CN=Role Managers,OU=managed,OU=groups, DC=test,DC=local") insertArrayItem(array, 1, "0b0ad0e1-2222-3333-ceds-44se4444") insertArrayItem(array, 2, "0ed8092a-29dw-23ub-sw19-23sdf09u") insertArrayItem(array, 3, "sedrofle-234n-32fs-2wld-sadf343d") insertArrayItem(array, 4, "34ajedf2-a232-adv0-a34w-adf3ljww") result = isPortalUserInAllRoles(conn, "34dsaer2-2342-saef-adv9-e4sdv039", array) log(result) log(" ") result = isPortalUserInAnyRoles(conn, "34dsaer2-2342-saef-adv9-e4sdv039", array) log(result) close(conn)
Opens an iterator over the members of a particular Portal Role.
Property | Value | Description |
---|---|---|
connection* | expression, variable | The Identity Portal connection definition |
roleDNsORId* | text, expression, variable | The DN or the IdAutoID of the user |
returnVariable | expression, variable | Returns an array of Role DNs or IdAutoIDs |
Example
conn = definePortalConnection("https://localhost:8443", "username", <Password>, true) result = getPortalRoleMembership(conn, "CN=Role Managers,OU=managed,OU=groups,DC=test,DC=local") log(result) # # With membership array in hand, add two new members to the role in the Roles module of Identity Portal # # Use the iterator to obtain the two new role members # records = openPortalRoleMembershipIterator(conn, "CN=Role Managers,OU=managed,OU=groups,DC=test,DC=local") forEach(record, records) { log(record) } close(conn)
Initiate synchronization of a Portal role.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Portal connection definition |
roleDN* | text, expression, variable | the DN of the role |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
success = syncPortalRole(connection, "CN=testgroup1,OU=groups, DC=test,DC=idauto,DC=lab")
Sync membership among all Portal roles for a single user.
Property | Value | Description |
---|---|---|
connection* | expression, variable | the Portal connection definition |
userDNOrID* | text, expression, variable | the DN or IdautoID of the user to sync |
returnVariable | expression, variable | name of the variable to be assigned to the return value |
Example
syncResult = syncPortalMembership(connection, "CN=Test User, OU=people,DC=example,DC=com") if(hasRecordField(syncResult, "added") { forEach(addedDN, getRecordFieldValues(syncResult, "added")) { log( "The user was added to role " + addedDN ) } } else { log( "The user was added to no role" ) } if (hasRecordField(syncResult, "removed")) { forEach(removedDN, getRecordFieldValues(syncResult, "removed")) { log("The user was removed from role " + removedDN) } } else { log("The user was removed from no roles") }