lp1744756 Docs fix and Permission change
authorKyle Huckins <khuckins@catalyte.io>
Mon, 27 Aug 2018 20:21:45 +0000 (20:21 +0000)
committerKathy Lussier <klussier@masslnc.org>
Thu, 30 Aug 2018 16:09:03 +0000 (12:09 -0400)
- Introduce MANAGE_CUSTOM_PERM_GRP_TREE permission.

- Remove unnecessary references to unused "disabled"
field for pgtdes.

- Update documentation to correctly explain how removing
and adding display entries works.

 Changes to be committed:
modified:   Open-ILS/examples/fm_IDL.xml
modified:   Open-ILS/src/sql/Pg/006.schema.permissions.sql
modified:   Open-ILS/src/sql/Pg/950.data.seed-values.sql
modified:   Open-ILS/src/sql/Pg/upgrade/XXXX.schema.perm-group-display.sql
modified:   Open-ILS/web/js/ui/default/staff/admin/local/permission/app.js
modified:   Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
modified:   docs/RELEASE_NOTES_NEXT/Client/pgtde.adoc

Signed-off-by: Kathy Lussier <klussier@masslnc.org>

Open-ILS/examples/fm_IDL.xml
Open-ILS/src/sql/Pg/006.schema.permissions.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.perm-group-display.sql
Open-ILS/web/js/ui/default/staff/admin/local/permission/app.js
Open-ILS/web/js/ui/default/staff/circ/patron/regctl.js
docs/RELEASE_NOTES_NEXT/Client/pgtde.adoc

index eb447a4..e60c5de 100644 (file)
@@ -7651,7 +7651,6 @@ SELECT  usr,
                        <field reporter:label="Parent Group" name="parent" reporter:datatype="link"/>
                        <field reporter:label="Org Unit" name="org" reporter:datatype="link"/>
                        <field reporter:label="Position" name="position" reporter:datatype="int"/>
-                       <field reporter:label="Disabled" name="disabled" reporter:datatype="bool"/>
                        <field reporter:label="Child Entries" name="children" oils_persist:virtual="true" reporter:datatype="link"/>
                </fields>
                <links>
@@ -7662,10 +7661,10 @@ SELECT  usr,
                </links>
                <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">
                        <actions>
-                               <create permission="CREATE_PERM" global_required="true"/>
+                               <create permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
                                <retrieve permission="STAFF_LOGIN" global_required="true"/>
-                               <update permission="UPDATE_PERM" global_required="true"/>
-                               <delete permission="DELETE_PERM" global_required="true"/>
+                               <update permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
+                               <delete permission="MANAGE_CUSTOM_PERM_GRP_TREE" global_required="true"/>
                        </actions>
                </permacrud>
        </class>
index 3e1bbf2..564f785 100644 (file)
@@ -624,7 +624,6 @@ CREATE TABLE permission.grp_tree_display_entry (
             DEFERRABLE INITIALLY DEFERRED,
     grp     INTEGER NOT NULL REFERENCES permission.grp_tree (id)
             DEFERRABLE INITIALLY DEFERRED,
-    disabled BOOLEAN NOT NULL DEFAULT FALSE,
     CONSTRAINT pgtde_once_per_org UNIQUE (org, grp)
 );
 
index aa0f163..d4ffab6 100644 (file)
@@ -1911,7 +1911,9 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES
  ( 607, 'EMERGENCY_CLOSING', oils_i18n_gettext( 607,
     'Create and manage Emergency Closings', 'ppl', 'description' )),
  (608, 'APPLY_WORKSTATION_SETTING',
-   oils_i18n_gettext(608, 'APPLY_WORKSTATION_SETTING', 'ppl', 'description'))
+   oils_i18n_gettext(608, 'APPLY_WORKSTATION_SETTING', 'ppl', 'description')),
+ ( 609, 'MANAGE_CUSTOM_PERM_GRP_TREE', oils_i18n_gettext( 609,
+    'Allows a user to manage custom permission group lists.', 'ppl', 'description' ))
 ;
 
 
index 2cbbd1f..a983ecb 100644 (file)
@@ -8,12 +8,15 @@ CREATE TABLE permission.grp_tree_display_entry (
             DEFERRABLE INITIALLY DEFERRED,
     grp     INTEGER NOT NULL REFERENCES permission.grp_tree (id)
             DEFERRABLE INITIALLY DEFERRED,
-    disabled BOOLEAN NOT NULL DEFAULT FALSE,
     CONSTRAINT pgtde_once_per_org UNIQUE (org, grp)
 );
 
 ALTER TABLE permission.grp_tree_display_entry
     ADD COLUMN parent integer REFERENCES permission.grp_tree_display_entry (id)
             DEFERRABLE INITIALLY DEFERRED;
+
+INSERT INTO permission.perm_list (id, code, description)
+VALUES (609, 'MANAGE_CUSTOM_PERM_GRP_TREE', oils_i18n_gettext( 609,
+    'Allows a user to manage custom permission group lists.', 'ppl', 'description' ));
             
 COMMIT;
\ No newline at end of file
index 8c5d73f..3b7f19a 100644 (file)
@@ -97,14 +97,7 @@ angular.module('egAdminPermGrpTreeApp',
             service.pgtde_array = [];
             service.disabled_entries = [];
             angular.forEach(entries, function(entry) {
-                if (entry.disabled() == 'f') {
-                    entry.disabled(false);
-                    service.pgtde_array.push(entry);
-                }
-                if (entry.disabled() == 't') {
-                    entry.disabled(true);
-                    service.disabled_entries.push(entry);
-                }
+                service.pgtde_array.push(entry);
             });
         });
     }
index d4b9728..640bb3b 100644 (file)
@@ -501,11 +501,9 @@ angular.module('egCoreMod')
 
                 var list = [];
                 function squash(node) {
-                    if (node.disabled() == 'f') {
-                        node.children().sort(compare)
-                        list.push(node);
-                        angular.forEach(node.children(), squash);
-                    }
+                    node.children().sort(compare);
+                    list.push(node);
+                    angular.forEach(node.children(), squash);
                 }
 
                 angular.forEach(treeArray, squash);
index d5a7198..a05c875 100644 (file)
@@ -33,14 +33,15 @@ Removing an Entry
 +++++++++++++++++
 If you want a particular Org Unit to not have access to specific
 entries, you may remove an entry. Removing an entry will remove it from 
-view. The entry will remain in the database, marked as disabled.
+view. The entry will be removed from the database.
 
 * Select an entry and press the *Remove* button.
 
 Adding an Entry
 +++++++++++++++
-You may "add" entries that have been removed previously. This is useful
-for moving entries to different parents, or making them root entries.
+You may add entries from permission groups that are not currently
+reflected in the permission group tree. This is useful for moving 
+entries to different parents, or making them root entries.
 
 image::media/pgtde_02.png[Add Entry modal]