[open-ils-commits] r9333 - trunk/Open-ILS/web/js/dojo/openils
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Apr 13 23:30:45 EDT 2008
Author: erickson
Date: 2008-04-13 22:52:50 -0400 (Sun, 13 Apr 2008)
New Revision: 9333
Modified:
trunk/Open-ILS/web/js/dojo/openils/User.js
Log:
added function to get the highest org list for a given permission
Modified: trunk/Open-ILS/web/js/dojo/openils/User.js
===================================================================
--- trunk/Open-ILS/web/js/dojo/openils/User.js 2008-04-14 02:51:59 UTC (rev 9332)
+++ trunk/Open-ILS/web/js/dojo/openils/User.js 2008-04-14 02:52:50 UTC (rev 9333)
@@ -83,6 +83,25 @@
initReq.send();
}
+
+ /**
+ * Returns a list of the "highest" org units where the user
+ * has the given permission.
+ */
+ openils.User.getPermOrgList = function(perm, onload) {
+
+ var ases = new OpenSRF.ClientSession('open-ils.actor');
+ var req = ases.request(
+ 'open-ils.actor.user.work_perm.highest_org_set',
+ openils.User.authtoken, perm);
+
+ req.oncomplete = function(r) {
+ org_list = r.recv().content();
+ onload(org_list);
+ }
+
+ req.send();
+ }
}
More information about the open-ils-commits
mailing list