3.1.1.1.38.2.2 GetUserRoleByName

The GetUserRoleByName procedure retrieves a specific user role definition that has the specified RoleName.

The following input parameter is used.

Param_roleName: This is a string that specifies the RoleName of the user role that is being requested.

The following is the output parameter from this procedure.

Result_role: This is a UserRole.

The following processing steps are involved:

  1. Look up the row in ADM_RoleDefinition with the RoleName value being Param_roleName.

  2. If the row is not found, then return NULL. Otherwise initialize Result_role with UserRole.

  3. Assign Result_role.RoleId with RoleId of the row.

  4. Copy the RoleDetails into Result_role.

  5. Call GetAllOperationsForRoleById of ADM_RoleOperationMapTable with Param_roleId initialized to RoleId.

  6. Assign Result_role.Operations with Result_Operations output.

  7. Return Result_role as the output of the procedure.