added method to grab work_ou related permissions
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 25 Aug 2008 21:57:34 +0000 (21:57 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 25 Aug 2008 21:57:34 +0000 (21:57 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10443 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/server/admin/adminlib.js

index c4d166a..a61b66c 100644 (file)
@@ -2,6 +2,7 @@ var USER;
 var SESSION;
 var PERMS = {};
 var ORG_CACHE = {};
+var OILS_WORK_PERMS = {};
 
 var XML_ELEMENT_NODE = 1;
 var XML_TEXT_NODE = 3;
@@ -58,6 +59,19 @@ function fetchHighestPermOrgs( session, userId, perms ) {
        return orgs;
 }
 
+function fetchHighestWorkPermOrgs(session, userId, perms) {
+    for(var i = 0; i < perms.length; i++) {
+        var perm = perms[i];
+        var req = new RemoteRequest(
+            'open-ils.actor',
+            'open-ils.actor.user.work_perm.highest_org_set',
+            session, perm);
+        req.send(true);
+        OILS_WORK_PERMS[perm] = req.getResultObject();
+    }
+}
+
+
 /* offset is the depth of the highest org 
        in the tree we're building 
   */