From: Mike Rylander Date: Thu, 16 Aug 2012 17:45:23 +0000 (-0400) Subject: Provide permission for copy editor field hiding X-Git-Url: http://git.equinoxoli.org/?p=transitory.git;a=commitdiff_plain;h=8110957bcb6fa686e3c55ae3c13f5968c14824ae Provide permission for copy editor field hiding We can adjust what fields are available in the copy editor in 2.2+, but that requires the general UPDATE_ORG_SETTING permission. The YAOUS-specific permission here allows more granular control, so that staff can be given the ability to adjust only that one OU setting. Signed-off-by: Mike Rylander Signed-off-by: Thomas Berezansky --- diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index d8d91ba..37a8b9b 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -1565,7 +1565,9 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES ( 537, 'ADMIN_SEARCH_FILTER_GROUP', oils_i18n_gettext( 537, 'Allows staff to manage search filter groups and entries', 'ppl', 'description' )), ( 538, 'VIEW_SEARCH_FILTER_GROUP', oils_i18n_gettext( 538, - 'Allows staff to view search filter groups and entries', 'ppl', 'description' )) + 'Allows staff to view search filter groups and entries', 'ppl', 'description' )), + ( 539, 'UPDATE_ui.hide_copy_editor_fields', oils_i18n_gettext( 539, + 'Allows staff to edit displayed copy editor fields', 'ppl', 'description' )) ; @@ -11668,7 +11670,7 @@ INSERT INTO config.global_flag (name, enabled, label) ) ); -INSERT INTO config.org_unit_setting_type ( name, label, description, datatype, grp ) +INSERT INTO config.org_unit_setting_type ( name, label, description, datatype, grp, update_perm ) VALUES ( 'ui.hide_copy_editor_fields', oils_i18n_gettext( @@ -11686,7 +11688,8 @@ INSERT INTO config.org_unit_setting_type ( name, label, description, datatype, g 'description' ), 'array', - 'gui' + 'gui', + 539 ); INSERT into config.org_unit_setting_type diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.copy_editor_perms.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.copy_editor_perms.sql new file mode 100644 index 0000000..3bbc2bc --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.copy_editor_perms.sql @@ -0,0 +1,6 @@ + +INSERT INTO permission.perm_list (id, code, description) + VALUES (539, 'UPDATE_ui.hide_copy_editor_fields', 'Allows staff to edit displayed copy editor fields'); + +UPDATE config.org_unit_setting_type SET update_perm = 539 WHERE name = 'ui.hide_copy_editor_fields'; +