LP1977761: Create fund rollover perm
authorTiffany Little <tlittle@georgialibraries.org>
Mon, 6 Jun 2022 18:05:15 +0000 (14:05 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 28 Oct 2022 01:32:30 +0000 (21:32 -0400)
This patch adds a new permission to perform fund propagation and rollover.

Signed-off-by: Tiffany Little <tlittle@georgialibraries.org>
Signed-off-by: Lindsay Stratton <lstratton@wlsmail.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>

Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funds-manager.component.ts
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.acqrolloverperm.sql [new file with mode: 0644]

index 44a7468..5d5df0f 100644 (file)
@@ -142,7 +142,7 @@ export class FundsManagerComponent extends AdminPageComponent implements OnInit,
     checkRolloverPerms() {
         this.canRollover = false;
 
-        this.perm2.hasWorkPermAt(['ADMIN_FUND'], true).then(permMap => {
+        this.perm2.hasWorkPermAt(['ADMIN_FUND_ROLLOVER'], true).then(permMap => {
             Object.keys(permMap).forEach(key => {
                 if (permMap[key].length > 0) {
                     this.canRollover = true;
index 5f104f5..4ecd2b7 100644 (file)
@@ -1972,7 +1972,9 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES
  ( 639, 'ADMIN_OPENATHENS', oils_i18n_gettext(639,
     'Allow a user to administer OpenAthens authentication service', 'ppl', 'description')),
  ( 640, 'ACCESS_ANGULAR_CIRC', oils_i18n_gettext(640,
-    'Allow a user to access the experimental Angular circulation interfaces', 'ppl', 'description'))
+    'Allow a user to access the experimental Angular circulation interfaces', 'ppl', 'description')),
+ ( 641, 'ADMIN_FUND_ROLLOVER', oils_i18n_gettext(641,
+    'Allow the user to perform fund propagation and rollover', 'ppl', 'description'))    
 ;
 
 SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000);
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acqrolloverperm.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.acqrolloverperm.sql
new file mode 100644 (file)
index 0000000..cb08020
--- /dev/null
@@ -0,0 +1,15 @@
+BEGIN;
+
+INSERT INTO permission.perm_list ( id, code, description )
+    VALUES (
+        639,
+        'ADMIN_FUND_ROLLOVER',
+        oils_i18n_gettext(
+            639,
+            'Allow a user to perform fund propagation and rollover',
+            'ppl',
+            'description'
+        )
+    );
+
+COMMIT;
\ No newline at end of file