Vandelay match set permission additions collab/dyrcona/vandelay-missing-perms-etc
authorBill Erickson <berick@esilibrary.com>
Wed, 21 Mar 2012 20:33:39 +0000 (16:33 -0400)
committerJason Stephenson <jstephenson@mvlc.org>
Fri, 30 Mar 2012 17:20:14 +0000 (13:20 -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

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.

NOTE: There is at least 1 other outstanding branch that uses the same ids
for permissions as this branch, so this branch may need to be edited again
depending on when it is finally merged.

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

index f4127c2..8ce2965 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 bd9fc24..b7d6569 100644 (file)
@@ -1538,6 +1538,10 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES
     'Allows a user to create, edit, and delete custom toolbars', 'ppl', 'description' )),
  ( 524, 'PLACE_UNFILLABLE_HOLD', oils_i18n_gettext( 524,
     'Allows a user to place a hold that cannot currently be filled.', 'ppl', 'description' ));
+ ( 525, 'ADMIN_IMPORT_MATCH_SET', oils_i18n_gettext( 523,
+    'Allows a user to create/retrieve/update/delete vandelay match sets', 'ppl', 'description' )),
+ ( 526, 'VIEW_IMPORT_MATCH_SET', oils_i18n_gettext( 524,
+    '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/XXXX.data.vandelay_perms_etc.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.vandelay_perms_etc.sql
new file mode 100644 (file)
index 0000000..e8e41b2
--- /dev/null
@@ -0,0 +1,27 @@
+-- Evergreen DB patch 0684.schema.acq-vandelay-integration.sql
+BEGIN;
+
+-- seed data --
+
+INSERT INTO permission.perm_list ( id, code, description ) 
+    VALUES ( 
+        525, 
+        'ADMIN_IMPORT_MATCH_SET',
+        oils_i18n_gettext( 
+            523,
+            'Allows a user to create/retrieve/update/delete vandelay match sets',
+            'ppl', 
+            'description' 
+        )
+    ), ( 
+        526, 
+        'VIEW_IMPORT_MATCH_SET',
+        oils_i18n_gettext( 
+            524,
+            'Allows a user to view vandelay match sets',
+            'ppl', 
+            'description' 
+        )
+    );
+
+COMMIT;