sub load_galileo {
my $self = shift;
-
+
+ my $galileo_url_base = $self->ctx->{get_org_setting}->($org_unit, 'opac.galileo_url_base');
+
my $token = $U->simplereq(
'open-ils.actor',
'open-ils.actor.session.safe_token',
$self->ctx->{authtoken}
);
- return $self->generic_redirect(
- "http://www.galileo.usg.edu/express?pinesid=$token");
+ my $galileo_url = $galileo_url_base . "express?pinesid=" . $token;
+
+ return $self->generic_redirect($galileo_url);
}
'View booking reservations', 'ppl', 'description')),
( 626, 'VIEW_BOOKING_RESERVATION_ATTR_MAP', oils_i18n_gettext(626,
'View booking reservation attribute maps', 'ppl', 'description'))
+ ( 2001, 'UPDATE_GALILEO_URL', oils_i18n_gettext(2001,
+ 'Set or update the GALILEO URL for PINES login', 'ppl', 'description'))
;
(3,'fullname')
;
+INSERT into config.org_unit_setting_type
+ ( name, grp, label, description, datatype, update_perm )
+VALUES (
+ 'opac.galileo_url_base', 'opac',
+ oils_i18n_gettext(
+ 'opac.galileo_url_base',
+ 'GALILEO base URL',
+ 'coust', 'label'),
+ oils_i18n_gettext('opac.galileo_url_base',
+ 'Base URL for GALILEO login feature. Example: https://www.galileo.usg.edu/ for production or https://gs-staging.galileo.usg.edu/ for testing',
+ 'coust', 'description'),
+ 'string', 2001
+);
+
+-- since this is really just for PINES, let's insert a default value
+INSERT INTO actor.org_unit_setting (org_unit, name, value) values (1, 'opac.galileo_url_base', 'https://www.galileo.usg.edu/');
+-- and give GlobalAdmin the perm
+INSERT INTO permission.grp_perm_map (grp, perm, depth) values ((select id from permission.grp_tree where name = 'GlobalAdmin'), 2001, 0);
--- /dev/null
+BEGIN;
+
+INSERT INTO permission.perm_list ( id, code, description ) VALUES ( 2001, 'UPDATE_GALILEO_URL', oils_i18n_gettext(2001,
+ 'Set or update the GALILEO URL for PINES login', 'ppl', 'description'));
+
+INSERT into config.org_unit_setting_type
+ ( name, grp, label, description, datatype, update_perm )
+VALUES (
+ 'opac.galileo_url_base', 'opac',
+ oils_i18n_gettext(
+ 'opac.galileo_url_base',
+ 'GALILEO base URL',
+ 'coust', 'label'),
+ oils_i18n_gettext('opac.galileo_url_base',
+ 'Base URL for GALILEO login feature. Example: https://www.galileo.usg.edu/ for production or https://gs-staging.galileo.usg.edu/ for testing',
+ 'coust', 'description'),
+ 'string', 2001
+);
+
+-- since this is really just for PINES, let's insert a default value
+INSERT INTO actor.org_unit_setting (org_unit, name, value) values (1, 'opac.galileo_url_base', 'https://www.galileo.usg.edu/');
+
+-- and give GlobalAdmin the perm
+INSERT INTO permission.grp_perm_map (grp, perm, depth) values ((select id from permission.grp_tree where name = 'GlobalAdmin'), 2001, 0);
+
+COMMIT;