From df6b48e66d362feb4f890b7eb4e4b8d16c3a65d2 Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 5 Jul 2007 14:33:27 +0000 Subject: [PATCH] require ALLOW_ALT_TCN perm to .override an overlay collision (which would try a different TCN). I'm not exactly clear on what all of this means in English :) git-svn-id: svn://svn.open-ils.org/ILS/trunk@7519 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/cat/z3950.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Open-ILS/xul/staff_client/server/cat/z3950.js b/Open-ILS/xul/staff_client/server/cat/z3950.js index ce5576034e..d34ef0dcd0 100644 --- a/Open-ILS/xul/staff_client/server/cat/z3950.js +++ b/Open-ILS/xul/staff_client/server/cat/z3950.js @@ -619,6 +619,20 @@ cat.z3950.prototype = { var msg = 'A record with TCN ' + r.payload.tcn + ' already exists.\nFIXME: add record summary here'; var title = 'Import Collision'; var btn1 = typeof r.payload.new_tcn == 'undefined' ? null : 'Overlay with alternate TCN ' + r.payload.new_tcn; + if (btn1) { + var robj = obj.network.simple_request( + 'PERM_CHECK',[ + ses(), + data.list.au[0].id(), + data.list.au[0].ws_ou(), + [ 'ALLOW_ALT_TCN' ] + ] + ); + if (typeof robj.ilsevent != 'undefined') { + obj.error.standard_unexpected_error_alert('check permission',E); + } + if (robj.length != 0) btn1 = null; + } var btn2 = 'Cancel Import'; var p = obj.error.yns_alert(msg,title,btn1,btn2,null,'Check here to confirm this action'); obj.error.sdump('D_ERROR','option ' + p + 'chosen'); -- 2.11.0