From 8c2feb65d15da529a84ea180668fc1d05211a3e8 Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Tue, 1 Mar 2016 12:23:39 -0500 Subject: [PATCH] JBAS-1185 Picklist fund selector perm repairs Enusre the fund search filter has a value set for the location org units, based on picklist access permissions, otherwise zero funds will be returned. Signed-off-by: Bill Erickson --- Open-ILS/web/js/ui/default/acq/picklist/view.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Open-ILS/web/js/ui/default/acq/picklist/view.js b/Open-ILS/web/js/ui/default/acq/picklist/view.js index 616eb92ba6..af7c6ae320 100644 --- a/Open-ILS/web/js/ui/default/acq/picklist/view.js +++ b/Open-ILS/web/js/ui/default/acq/picklist/view.js @@ -12,6 +12,21 @@ var liTable; function load() { + // before rendering any fund selectors, limit the funds to + // attempt to retrieve to those the user can actually use. + new openils.User().getPermOrgList( + ['CREATE_PICKLIST', 'UPDATE_PICKLIST', 'MANAGE_FUND'], + function(orgs) { + // fundSearchSelector is defined in li_table.js + if (typeof fundSearchFilter != 'undefined') + fundSearchFilter.org = orgs; + load2(); + }, + true, true // descendants, id_list + ); +} + +function load2() { liTable = new AcqLiTable(); liTable.isPL = plId; liTable.initBatchUpdater(); -- 2.11.0