From: Bill Erickson Date: Tue, 1 Mar 2016 17:23:39 +0000 (-0500) Subject: JBAS-1185 Picklist fund selector perm repairs X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=8c2feb65d15da529a84ea180668fc1d05211a3e8;p=working%2FEvergreen.git 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 --- 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();