url_prefix option for using/forcing SSL. oils.secure_opac preference for doing such... collab/phasefx/secure_opac
authorJason Etheridge <jason@esilibrary.com>
Tue, 26 Jul 2011 14:33:13 +0000 (10:33 -0400)
committerJason Etheridge <jason@esilibrary.com>
Tue, 26 Jul 2011 14:33:13 +0000 (10:33 -0400)
commiteb72692ef4fc0e294b0a7164a75be9cd68a8caed
tree9832212a2ab5775743074b64d734cba88090809f
parent0d789d144b7f22240ff6b86d8d91248c355db793
url_prefix option for using/forcing SSL.  oils.secure_opac preference for doing such with the embedded OPAC

To use the preference, you may want to include something like this in server/skin/custom.js:
// Force SSL for the OPAC
try {
    netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
    var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
    if (!prefs.prefHasUserValue('oils.secure_opac')) {
        prefs.setBoolPref('oils.secure_opac',true);
    }
} catch(E) {
    alert('Error in custom.js trying to set oils.secure_opac preference to true: ' + E + '\n');
}
// Use the shiny new TT-OPAC
urls['opac'] = '/eg/opac/advanced';
urls['opac_rdetail'] = '/eg/opac/record';
urls['opac_rresult'] = '/eg/opac/results';
urls['browser'] = urls.opac;

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Open-ILS/xul/staff_client/chrome/content/cat/opac.js
Open-ILS/xul/staff_client/chrome/content/main/menu.js
Open-ILS/xul/staff_client/chrome/content/util/browser.js
Open-ILS/xul/staff_client/server/cat/spine_labels.js
Open-ILS/xul/staff_client/server/patron/display.js