LP#1842297 - Add ADMIN_OPENATHENS perm to perm list
authorChris Sharp <csharp@georgialibraries.org>
Sun, 10 Nov 2019 19:31:48 +0000 (14:31 -0500)
committerJane Sandberg <sandbej@linnbenton.edu>
Wed, 24 Jun 2020 06:36:04 +0000 (23:36 -0700)
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>
Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/800.fkeys.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.openathens_identity.sql

index d490989..5c06631 100644 (file)
@@ -1405,7 +1405,7 @@ SELECT SETVAL('config.openathens_name_field_id_seq'::TEXT, 100);
 CREATE TABLE config.openathens_identity (
     id                          SERIAL  PRIMARY KEY,
     active                      BOOL    NOT NULL DEFAULT true,
-    org_unit                    INT     NOT NULL REFERENCES actor.org_unit (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
+    org_unit                    INT     NOT NULL, -- REFERENCES actor.org_unit (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED,
     api_key                     TEXT    NOT NULL,
     connection_id               TEXT    NOT NULL,
     connection_uri              TEXT    NOT NULL,
index 58181cb..4d23c97 100644 (file)
@@ -256,6 +256,10 @@ ALTER TABLE asset.copy_template ADD CONSTRAINT asset_copy_template_floating_fkey
 ALTER TABLE config.marc_field ADD CONSTRAINT config_marc_field_owner_fkey FOREIGN KEY (owner) REFERENCES actor.org_unit(id) DEFERRABLE INITIALLY DEFERRED;
 ALTER TABLE config.marc_subfield ADD CONSTRAINT config_marc_subfield_owner_fkey FOREIGN KEY (owner) REFERENCES actor.org_unit(id) DEFERRABLE INITIALLY DEFERRED;
 
+ALTER TABLE config.openathens_identity ADD CONSTRAINT config_openathens_identity_ou_fkey
+FOREIGN KEY (org_unit) REFERENCES actor.org_unit (id) ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED;
+
+
 ALTER TABLE config.copy_tag_type ADD CONSTRAINT copy_tag_type_owner_fkey FOREIGN KEY (owner) REFERENCES  actor.org_unit(id) DEFERRABLE INITIALLY DEFERRED;
 
 ALTER TABLE config.print_template ADD CONSTRAINT cpt_owner_fkey 
index b6959bb..3af7ddb 100644 (file)
@@ -1939,7 +1939,9 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES
  ( 621, 'VIEW_BOOKING_RESOURCE_TYPE', oils_i18n_gettext(621,
     'View booking resource types', 'ppl', 'description')),
  ( 622, 'VIEW_BOOKING_RESOURCE', oils_i18n_gettext(622,
-    'View booking resources', 'ppl', 'description'))
+    'View booking resources', 'ppl', 'description')),
+ ( 623, 'ADMIN_OPENATHENS', oils_i18n_gettext(623,
+    'Allow a user to administer OpenAthens authentication service', 'ppl', 'description'))
 ;
 
 
index e43010d..9f07014 100644 (file)
@@ -51,4 +51,9 @@ CREATE TABLE config.openathens_identity (
     release_home_ou             BOOL    NOT NULL DEFAULT false
 );
 
+
+INSERT INTO permission.perm_list ( id, code, description) VALUES 
+  ( 623, 'ADMIN_OPENATHENS', oils_i18n_gettext(623,
+     'Allow a user to administer OpenAthens authentication service', 'ppl', 'description'));
+
 COMMIT;