From: Jason Etheridge Date: Tue, 7 Sep 2021 01:54:50 +0000 (-0400) Subject: lp1787968 jacket_upload: schema X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=69f221cd3a24a3aadfc26dd3323b758ca297639b;p=evergreen%2Ftadl.git lp1787968 jacket_upload: schema Changed permission id due to conflict. Signed-off-by: Jason Etheridge Signed-off-by: Michele Morgan --- 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 0ca785a758..7f378cd9d3 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -1967,6 +1967,8 @@ INSERT INTO permission.perm_list ( id, code, description ) VALUES 'Allow the user to delete a record note', 'ppl', 'description')), ( 636, 'ADMIN_STAFF_PORTAL_PAGE', oils_i18n_gettext( 636, 'Update the staff client portal page', 'ppl', 'description' )) + ( 637, 'UPLOAD_COVER_IMAGE', oils_i18n_gettext(637, + 'Upload local cover images for added content.', 'ppl', 'description')) ; SELECT SETVAL('permission.perm_list_id_seq'::TEXT, 1000); @@ -21371,6 +21373,33 @@ INSERT INTO permission.grp_perm_map (grp, perm, depth, grantable) aout.name = 'Consortium' AND (perm.code = 'ADMIN_GEOLOCATION_SERVICES' OR perm.code = 'VIEW_GEOLOCATION_SERVICES'); +-- cover image uploads + +INSERT INTO config.global_flag (name, value, enabled, label) +VALUES ( + 'opac.cover_upload_compression', + 0, + TRUE, + oils_i18n_gettext( + 'opac.cover_upload_compression', + 'Cover image uploads are converted to PNG files with this compression, on a scale of 0 (no compression) to 9 (maximum compression), or -1 for the zlib default.', + 'cgf', 'label' + ) +); + +INSERT INTO config.org_unit_setting_type (name, label, grp, description, datatype) +VALUES ( + 'opac.cover_upload_max_file_size', + oils_i18n_gettext('opac.cover_upload_max_file_size', + 'Maximum file size for uploaded cover image files (at time of upload, prior to rescaling).', + 'coust', 'label'), + 'opac', + oils_i18n_gettext('opac.cover_upload_max_file_size', + 'The number of bytes to allow for a cover image upload. If unset, defaults to 10737418240 (roughly 10GB).', + 'coust', 'description'), + 'integer' +); + ------------------- Disabled example A/T defintions ------------------------------ -- Create a "dummy" slot when applicable, and trigger the "offer curbside" events diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.jacket_uploader.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.jacket_uploader.sql new file mode 100644 index 0000000000..4aecfdad6a --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.schema.jacket_uploader.sql @@ -0,0 +1,38 @@ +BEGIN; + +-- check whether patch can be applied +SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version); + +-- 950.data.seed-values.sql + +INSERT INTO config.global_flag (name, value, enabled, label) +VALUES ( + 'opac.cover_upload_compression', + 0, + TRUE, + oils_i18n_gettext( + 'opac.cover_upload_compression', + 'Cover image uploads are converted to PNG files with this compression, on a scale of 0 (no compression) to 9 (maximum compression), or -1 for the zlib default.', + 'cgf', 'label' + ) +); + +INSERT INTO config.org_unit_setting_type (name, label, grp, description, datatype) +VALUES ( + 'opac.cover_upload_max_file_size', + oils_i18n_gettext('opac.cover_upload_max_file_size', + 'Maximum file size for uploaded cover image files (at time of upload, prior to rescaling).', + 'coust', 'label'), + 'opac', + oils_i18n_gettext('opac.cover_upload_max_file_size', + 'The number of bytes to allow for a cover image upload. If unset, defaults to 10737418240 (roughly 10GB).', + 'coust', 'description'), + 'integer' +); + +INSERT INTO permission.perm_list ( id, code, description ) VALUES + ( 637, 'UPLOAD_COVER_IMAGE', oils_i18n_gettext(637, + 'Upload local cover images for added content.', 'ppl', 'description')) +; + +COMMIT;