LP#1845235: new retrieve perm for Holdings Import Profile user/jeffdavis/lp1845235-holdings-import-profile-view-perm
authorLiam Whalen <liam.whalen@bc.libraries.coop>
Tue, 24 Sep 2019 17:16:40 +0000 (10:16 -0700)
committerJeff Davis <jeff.davis@bc.libraries.coop>
Tue, 24 Sep 2019 17:58:13 +0000 (10:58 -0700)
Currently the permissions required to view holdings import profiles are
the same perms needed to update the profile.  But in some cases it's
desirable to restrict the ability to edit profiles to admins, while
allowing other staff to be able to view (and thus select) a holdings
import profile to use when importing MARC records.

This commit adds a new VIEW_IMPORT_ITEM_ATTR_DEF permission, which
replaces the current perms in the fieldmapper for retrieving the
Holdings Import Profile details.

Signed-off-by: Liam Whalen <liam.whalen@bc.libraries.coop>
Signed-off-by: Jeff Davis <jeff.davis@bc.libraries.coop>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.seed-value.view_import_item_attr_def.sql [new file with mode: 0644]
docs/RELEASE_NOTES_NEXT/Administration/lp1845235_holdings_import_profile_view_perm.adoc [new file with mode: 0644]

index aea0037..7ed38fd 100644 (file)
@@ -449,7 +449,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
                                <create permission="CREATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
-                               <retrieve permission="CREATE_IMPORT_ITEM_ATTR_DEF UPDATE_IMPORT_ITEM_ATTR_DEF DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
+                               <retrieve permission="VIEW_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
                                <update permission="UPDATE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
                                <delete permission="DELETE_IMPORT_ITEM_ATTR_DEF ADMIN_IMPORT_ITEM_ATTR_DEF" context_field="owner"/>
                        </actions>
index daf37c3..9d3639f 100644 (file)
@@ -1931,7 +1931,9 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES
  ( 617, 'IMPORT_ON_ORDER_CAT_COPY', oils_i18n_gettext( 617,
     'Allows users to import copies based on the on-order items attached to a record', 'ppl', 'description' )),
  ( 618, 'CREATE_PRECAT', oils_i18n_gettext(618,
-    'Allows a user to create a pre-catalogued copy', 'ppl', 'description'))
+    'Allows a user to create a pre-catalogued copy', 'ppl', 'description')),
+ ( 619, 'VIEW_IMPORT_ITEM_ATTR_DEF', oils_i18n_gettext(619,
+    'Allow a user to view Holdings Import Profiles', 'ppl', 'description'))
 ;
 
 
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.seed-value.view_import_item_attr_def.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.seed-value.view_import_item_attr_def.sql
new file mode 100644 (file)
index 0000000..3dbee3f
--- /dev/null
@@ -0,0 +1,7 @@
+BEGIN;
+
+INSERT INTO permission.perm_list ( id, code, description ) VALUES
+ ( 619, 'VIEW_IMPORT_ITEM_ATTR_DEF', oils_i18n_gettext(619,
+    'Allow a user to view Holdings Import Profiles', 'ppl', 'description'))
+
+COMMIT;
diff --git a/docs/RELEASE_NOTES_NEXT/Administration/lp1845235_holdings_import_profile_view_perm.adoc b/docs/RELEASE_NOTES_NEXT/Administration/lp1845235_holdings_import_profile_view_perm.adoc
new file mode 100644 (file)
index 0000000..3538d06
--- /dev/null
@@ -0,0 +1,9 @@
+Permissions
++++++++++++
+
+A new permission has been added for allowing users to view Holdings Import Profiles:
+
+* VIEW_IMPORT_ITEM_ATTR_DEF
+
+Previously only users who could modify Holdings Import Profiles were able to view them.
+