3.1.1.1.42.2.3 GetPolicyMapEntriesForPolicyId

The GetPolicyMapEntriesForPolicyId procedure can be used to retrieve all the entries mapping UserRole to corresponding AccessScope for a specific PolicyId.

The following input parameter is used.

Param_policyId: This is a 64-bit signed integer that specifies the PolicyId of the UserAccessPolicy for which the operation is being requested.

The following is the output parameter from this procedure.

Result_policyEntries: A collection of type AccessScopeToUserRoleMapping.

The following processing steps are involved:

  1. Retrieve all the rows in the ADM_PolicyMapTable that have PolicyId as Param_policyId.

  2. Initialize Result_policyEntries as Collection of AccessScopeToUserRoleMapping.

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

    1. Create an instance policyEntry of type AccessScopeToUserRoleMapping and assign the following values:

      1. Assign RoleId to policyEntry.UserRoleId.

      2. Call GetUserRoleById of ADM_RoleDefinitionTable by passing the RoleId as Param_roleId. Assign Result_role.Name to policyEntry.UserRoleName.

      3. Assign AccessScopeId to policyEntry.AccessScopeId.

      4. Call GetAccessScopeById of ADM_AccessScopeTable by passing the AccessScopeId as Param_accessScopeId. Assign Result_accessScope.FullScopePath to policyEntry.AccessScopeName.

    2. Add the policyEntry to Result_policyEntries collection.

  4. Return Result_policyEntries as the output of the procedure.