From 9add41a950725d46c9eef21e808ac92375fcfc01 Mon Sep 17 00:00:00 2001 From: James Fournie <jfournie@vcc.ca> Date: Thu, 17 Jan 2019 13:23:12 -0800 Subject: [PATCH] LP1783421 - Make Copy Alerts permission not global For some reason copy alerts require global permissions. Instead update the IDL for asset.active_copy_alert and asset.copy_alert to require {CREATE,VIEW,UPDATE,DELETE}_COPY_ALERT perms only as far as they are scoped for the circ lib of the copy. Signed-off-by: James Fournie <jfournie@vcc.ca> Signed-off-by: Chris Sharp <csharp@georgialibraries.org> Signed-off-by: John Amundson <jamundson@cwmars.org> Signed-off-by: Jason Stephenson <jason@sigio.com> --- Open-ILS/examples/fm_IDL.xml | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml index d541e5fc96..c66eaad4e5 100644 --- a/Open-ILS/examples/fm_IDL.xml +++ b/Open-ILS/examples/fm_IDL.xml @@ -7589,10 +7589,18 @@ SELECT usr, </links> <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <actions> - <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/> - <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/> - <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/> - <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/> + <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT"> + <context link="copy" field="circ_lib"/> + </create> + <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT"> + <context link="copy" field="circ_lib"/> + </retrieve> + <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT"> + <context link="copy" field="circ_lib"/> + </update> + <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT"> + <context link="copy" field="circ_lib"/> + </delete> </actions> </permacrud> </class> @@ -7617,10 +7625,18 @@ SELECT usr, </links> <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1"> <actions> - <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT" global_required="true"/> - <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT" global_required="true"/> - <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT" global_required="true"/> - <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT" global_required="true"/> + <create permission="ADMIN_COPY_ALERT CREATE_COPY_ALERT"> + <context link="copy" field="circ_lib"/> + </create> + <retrieve permission="ADMIN_COPY_ALERT VIEW_COPY_ALERT"> + <context link="copy" field="circ_lib"/> + </retrieve> + <update permission="ADMIN_COPY_ALERT UPDATE_COPY_ALERT"> + <context link="copy" field="circ_lib"/> + </update> + <delete permission="ADMIN_COPY_ALERT DELETE_COPY_ALERT"> + <context link="copy" field="circ_lib"/> + </delete> </actions> </permacrud> </class> -- 2.11.0