<field name="usr" reporter:datatype="link" reporter:label="ILS User" oils_obj:required="true"/>
<field name="workstation" reporter:datatype="link" reporter:label="Workstation"/>
<field name="ephemeral" reporter:datatype="bool" reporter:label="Ephemeral"/>
+ <field name="activity_who" reporter:datatype="text" reporter:label="Activity Who"/>
</fields>
<links>
<link field="usr" reltype="has_a" key="id" map="" class="au"/>
oils_obj:fieldmapper="sip::session"
oils_persist:tablename="sip.session"
reporter:label="SIP Session">
- <fields oils_persist:primary="token">
+ <fields oils_persist:primary="key">
<field name="key" reporter:datatype="text" reporter:label="SIP Session Key"/>
<field name="ils_token" reporter:datatype="text" reporter:label="ILS Auth Token"/>
<field name="account" reporter:datatype="link" reporter:label="SIP Account"/>
# A cached session means we have successfully logged in with
# the SIP credentials provided during a login request. All
# message types following require authentication.
- my $session = OpenILS::Application::SIPSession->from_cache($seskey);
+ my $session = OpenILS::Application::SIPSession->find($seskey);
return OpenILS::Event->new('SIP2_SESSION_REQUIRED') unless $session;
my $MESSAGE_MAP = {
set_patron_summary_items($session, $details, %params);
set_patron_summary_list_items($session, $details, %params);
+ $U->log_user_activity($patron->id,
+ $session->sip_account->activity_who || $session->config->{default_activity_who},
+ 'verify');
+
return $details;
}
$seskey, {flesh => 1, flesh_fields => {sipses => ['account']}}]);
if ($ses) {
- $session->sip_account($ses->account);
+ $session->{sip_account} = $ses->account;
$e->authtoken($ses->ils_token);
# Ephemeral account sessions are not tracked in the database
return 1 if $U->is_true($self->sip_account->ephemeral);
- my $ses = Fieldmapper::sip::account->new;
+ my $ses = Fieldmapper::sip::session->new;
$ses->key($seskey);
$ses->ils_token($auth->{payload}->{authtoken});
$ses->account($self->sip_account->id);
$e->xact_begin;
unless ($e->create_sip_session($ses)) {
- $e->rolllback;
+ $e->rollback;
return 0;
}
DEFERRABLE INITIALLY DEFERRED,
workstation INTEGER REFERENCES actor.workstation(id),
-- sessions for ephemeral accounts are not tracked in sip.session
- ephemeral BOOLEAN NOT NULL DEFAULT FALSE
+ ephemeral BOOLEAN NOT NULL DEFAULT FALSE,
+ activity_who TEXT -- config.usr_activity_type.ewho
);
CREATE TABLE sip.session (
'patron_status_permit_all', 'false'
), (
(SELECT id FROM config.sip_setting_group WHERE institution = 'example'),
+ 'Patron holds data may be returned as either "title" or "barcode"',
+ 'default_activity_who', 'null'
+), (
+ (SELECT id FROM config.sip_setting_group WHERE institution = 'example'),
'Patron circulation data may be returned as either "title" or "barcode"',
'msg64_summary_datatype', '"title"'
), (