<appname>open-ils.serial</appname>
<appname>open-ils.hold-targeter</appname>
<appname>open-ils.ebook_api</appname>
-<<<<<<< HEAD
<appname>open-ils.courses</appname>
<appname>open-ils.curbside</appname>
-=======
<appname>open-ils.sip2</appname>
->>>>>>> migrating top sip2 service
</activeapps>
</localhost>
</hosts>
$config = $session->config;
} else {
- # TODO: where should the 'allow_sc_status_before_login' setting
- # live, since we don't yet have an institution configuration loaded?
- # TODO: Do we need a 'default institution' setting?
- $config = {id => 'NONE', supports => [], settings => {}};
+
+ # Confirm sc-status-before-login is enabled before continuing.
+
+ my $flag = new_editor()->search_config_global_flag({
+ name => 'sip.sc_status_before_login_institution',
+ value => {'!=' => undef},
+ enabled => 't',
+ })->[0];
+
+ return OpenILS::Event->new(
+ 'SC_STATUS_REQUIRES_LOGIN', {payload => $message}) unless $flag;
+
+ $config = {
+ settings => {},
+ id => $flag->value,
+ supports => OpenILS::Application::SIPSession->supports
+ };
}
my $response = {
-- carve space for other canned setting groups
SELECT SETVAL('sip.setting_group_id_seq'::TEXT, 1000);
+-- has to be global since settings are linked to accounts and if
+-- status-before-login is used, no account information will be available.
+INSERT INTO config.global_flag (name, value, enabled, label) VALUES
+( 'sip.sc_status_before_login_institution', NULL, FALSE,
+ oils_i18n_gettext(
+ 'sip.sc_status_before_login_institution',
+ 'Activate status-before-login-support and define the institution ' ||
+ 'value which should be used in the response',
+ 'cgf', 'label')
+);
+
INSERT INTO sip.setting (setting_group, name, value, description)
VALUES (
1, 'currency', '"USD"',
'AV Format. Options: eg_legacy, 3m, swyer_a, swyer_b',
'sipset', 'description')
), (
- 1, 'allow_sc_status_before_login', 'true',
- oils_i18n_gettext(
- (SELECT id FROM sip.setting WHERE name = 'allow_sc_status_before_login'),
- 'Allow clients to request the SIP server status before login (message 99)',
- 'sipset', 'description')
-), (
1, 'due_date_use_sip_date_format', 'false',
oils_i18n_gettext(
(SELECT id FROM sip.setting WHERE name = 'due_date_use_sip_date_format'),