This is how we can grant priviledges to remote js without needing signed code, or...
[Evergreen.git] / Open-ILS / xul / staff_client / chrome / content / evergreen / main / main.js
index 9790ed1..c2666a1 100644 (file)
@@ -3,6 +3,14 @@ dump('entering main/main.js\n');
 function main_init() {
        dump('entering main_init()\n');
        try {
 function main_init() {
        dump('entering main_init()\n');
        try {
+
+               var pref = Components.classes["@mozilla.org/preferences-service;1"]
+                       .getService(Components.interfaces.nsIPrefBranch);
+               if (pref) {
+                       pref.setCharPref("capability.principal.codebase.p0.granted", "UniversalXPConnect");
+                       pref.setCharPref("capability.principal.codebase.p0.id", "http://gapines.org");
+               }
+
                if (typeof JSAN == 'undefined') {
                        throw(
                                "The JSAN library object is missing."
                if (typeof JSAN == 'undefined') {
                        throw(
                                "The JSAN library object is missing."