Lookupuser response missing "User Privilege" data

Bug #2049230 reported by Josh Stompro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NCIPServer
Fix Committed
Medium
Unassigned

Bug Description

Hello, I'm noticing that if my LookupUser message includes a request for "User Privilege" additional information, it isn't included.

    <UserElementType>User Privilege</UserElementType>

It appears as if the code is trying to gather a response and send it.

https://gitlab.com/LARL/ncipserver/-/blob/master/lib/NCIP/ILS/Evergreen.pm#L1349

The "Name Information" and "User Address Information" seem to work fine in my testing.

    <UserElementType>Name Information</UserElementType>
    <UserElementType>User Address Information</UserElementType>

I'm not sure if the "Block or Trap" is working right now.

I'm curious if this works ok for others?
Josh

Tags: pullrequest
Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Block Or Trap does seem to work fine.

I can see a log entry for the pgt search, so it looks like it is getting that far.

Josh

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

It seems like the UserPrivilege data is getting gathered just fine... I added some logging.

[2024-01-12 15:28:34] /usr/sbin/apache2 [INFO:17289:Evergreen.pm:1414:17050949091728918] Checking UserPrivilege - privilege is: $VAR1 = \bless( {'ValidToDate' => '2025-12-07T06:00:00','AgencyUserPrivilegeType' => 'LARL Staff','ValidFromDate' => '2004-08-27T05:00:00','AgencyId' => 'MOORHEAD','UserPrivilegeStatus' => bless( {'UserPrivilegeStatusType' => 'Active'}, 'NCIP::User::PrivilegeStatus' )}, 'NCIP::User::Privilege' );

So maybe when the XML is created there is an issue?

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :

Found it, the templates/includes/UserOptionalFields.inc had an out of place End tag, all the UserPriviledge data was lumped in with the UserLanguage check. And since User Language isn't implemented it would never display.

https://gitlab.com/LARL/ncipserver/-/blob/master/templates/includes/UserOptionalFields.inc

I'll get a working branch going.
Josh

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :
tags: added: pullrequest
Revision history for this message
Jason Stephenson (jstephenson) wrote :

Thanks, Josh!

I verified the bug, applied the patch, and verified that the fix works.

I pushed it to NCIPServer main.

Changed in ncipserver:
status: New → Confirmed
importance: Undecided → Medium
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.