Vandelay match set permission additions
authorBill Erickson <berick@esilibrary.com>
Wed, 21 Mar 2012 20:33:39 +0000 (16:33 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Sat, 28 Apr 2012 21:17:49 +0000 (17:17 -0400)
Allow retrieve access for match points with the VIEW_IMPORT_MATCH_SET
permission (in addition to ADMIN_IMPORT_MATCH_SET).

Adds 2 new permissions to the database:

ADMIN_IMPORT_MATCH_SET
VIEW_IMPORT_MATCH_SET

From Jason Stephenson resolving conflicts:
> Conflicts:
>
>  Open-ILS/src/sql/Pg/950.data.seed-values.sql
>
> I had to change the ids of the new permissions because another branch
> had used one of the ids since this branch was last rebased.  I also edited
> the ids in the upgrade script to match what is in 950.data.seed-values.sql.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Jason Stephenson <jstephenson@mvlc.org>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/0707.data.vandelay_perms_etc.sql [new file with mode: 0644]

index 9d9b30f..c89fa46 100644 (file)
@@ -544,7 +544,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="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
-                               <retrieve permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
+                               <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET" context_field="owner"/>
                                <update permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
                                <delete permission="ADMIN_IMPORT_MATCH_SET" context_field="owner"/>
                        </actions>
@@ -575,7 +575,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                                <create permission="ADMIN_IMPORT_MATCH_SET">
                     <context link="match_set" field="owner"/>
                                </create>
-                               <retrieve permission="ADMIN_IMPORT_MATCH_SET">
+                               <retrieve permission="ADMIN_IMPORT_MATCH_SET VIEW_IMPORT_MATCH_SET">
                     <context link="match_set" field="owner"/>
                                </retrieve>
                                <update permission="ADMIN_IMPORT_MATCH_SET">
index 0fc21e7..6b29c20 100644 (file)
@@ -87,7 +87,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0706', :eg_version); -- dbwells/senator
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0707', :eg_version); -- berick/dyrcona/senator
 
 CREATE TABLE config.bib_source (
        id              SERIAL  PRIMARY KEY,
index e71a359..fafa89f 100644 (file)
@@ -1545,7 +1545,11 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES
  ( 527, 'DELETE_PATRON_STAT_CAT_ENTRY_DEFAULT', oils_i18n_gettext( 527, 
     'User may unset a default entry in a patron statistical category', 'ppl', 'description' )),
  ( 528, 'ADMIN_ORG_UNIT_CUSTOM_TREE', oils_i18n_gettext( 528, 
-    'User may update custom org unit trees', 'ppl', 'description' ));
+    'User may update custom org unit trees', 'ppl', 'description' )),
+ ( 529, 'ADMIN_IMPORT_MATCH_SET', oils_i18n_gettext( 529,
+    'Allows a user to create/retrieve/update/delete vandelay match sets', 'ppl', 'description' )),
+ ( 530, 'VIEW_IMPORT_MATCH_SET', oils_i18n_gettext( 530,
+    'Allows a user to view vandelay match sets', 'ppl', 'description' ));
 
 SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
 
diff --git a/Open-ILS/src/sql/Pg/upgrade/0707.data.vandelay_perms_etc.sql b/Open-ILS/src/sql/Pg/upgrade/0707.data.vandelay_perms_etc.sql
new file mode 100644 (file)
index 0000000..fe180b7
--- /dev/null
@@ -0,0 +1,29 @@
+-- Evergreen DB patch 0707.schema.acq-vandelay-integration.sql
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0707', :eg_version);
+
+-- seed data --
+
+INSERT INTO permission.perm_list ( id, code, description ) 
+    VALUES ( 
+        529, 
+        'ADMIN_IMPORT_MATCH_SET',
+        oils_i18n_gettext( 
+            529,
+            'Allows a user to create/retrieve/update/delete vandelay match sets',
+            'ppl', 
+            'description' 
+        )
+    ), ( 
+        530, 
+        'VIEW_IMPORT_MATCH_SET',
+        oils_i18n_gettext( 
+            530,
+            'Allows a user to view vandelay match sets',
+            'ppl', 
+            'description' 
+        )
+    );
+
+COMMIT;