3.1.1.1.39.2.1 GetAllOperationsForRoleById

The GetAllOperationsForRoleById procedure retrieves all the operations associated with a defined UserRole.

The following input parameter is used in this procedure.

Param_roleId: This is a 64-bit signed integer that specifies the RoleId of the user role for which the operations are being requested.

The following is the output parameter from this procedure.

Result_operations: A collection of type IpamAdminOperation.

The processing steps are as follows:

  1. Retrieve all the rows in the ADM_RoleOperationMapTable that have RoleDefinitionId as Param_roleId.

  2. Initialize Result_operations as Collection of IpamAdminOperation.

  3. For each row that has been retrieved, perform the following steps:

  4. Create an instance adminOperation of type IpamAdminOperation and assign the following values to this:

    1. Assign OperationId to adminOperation.OperationId.

    2. Look up the Operation table mentioned in ADM_AdminOperationsTable for the OperationId and assign the corresponding Operation Name, OperationGroupId, and IsAdminRoleOnlyOperation values to adminOperation.OperationName, adminOperation.Category, and adminOperation.IsAdminRoleOnlyOperation properties, respectively.

    3. Look up the Operation Category table mentioned in ADM_AdminOperationGroupsMapTable for the Operation Group Id and assign the corresponding Operation Group Name value to adminOperation.CategoryName property.

  5. Add the adminOperation to Result_operations collection.

  6. Return Result_operations as the output of the procedure.