stable

Clone or download

Read-only

feat: Checkbox to enforce filename pattern

Now siteadmin better knows how to deactivate the feature thanks to a dedicated checkbox to enforce (or not) the filename pattern. The admin cannot enforce an empty pattern. The admin can keep the pattern but disable the enforcement. Part of story #24166: apply a naming pattern on files to enforce a convention Change-Id: Ib68934f57e990ce444631746067b2ff03dcbead1

Modified Files

Name
M plugins/docman/db/install.sql +2 −1 Go to diff View file
A plugins/docman/db/mysql/updates/2022/202203171347_add_is_filename_pattern_enforced.php +73 −0 Go to diff View file
M plugins/docman/include/Docman_Actions.class.php +6 −3 Go to diff View file
A plugins/docman/include/FilenamePattern/EnforcedEmptyPatternException.php +37 −0 Go to diff View file
A plugins/docman/include/FilenamePattern/FilenamePatternException.php +27 −0 Go to diff View file
M plugins/docman/include/FilenamePattern/FilenamePatternFeedbackHandler.php +3 −3 Go to diff View file
M plugins/docman/include/FilenamePattern/FilenamePatternRetriever.php +8 −5 Go to diff View file
M plugins/docman/include/FilenamePattern/FilenamePatternUpdater.php +8 −3 Go to diff View file
M plugins/docman/include/FilenamePattern/FilenamePatternValidator.php +1 −1 Go to diff View file
M plugins/docman/include/FilenamePattern/InvalidMinimalPatternException.php +1 −2 Go to diff View file
M plugins/docman/include/Settings/DAOSettings.php +3 −1 Go to diff View file
A plugins/docman/include/Settings/SearchFilenamePatternInSettings.php +31 −0 Go to diff View file
M plugins/docman/include/Settings/SettingsDAO.php +15 −7 Go to diff View file
M plugins/docman/include/view/Docman_View_Admin_FilenamePattern.class.php +18 −3 Go to diff View file
A plugins/docman/scripts/admin-filename-pattern.ts +52 −0 Go to diff View file
M plugins/docman/site-content/fr_FR/LC_MESSAGES/tuleap-docman.po +6 −0 Go to diff View file
M plugins/docman/templates/admin/pattern-filename.mustache +27 −3 Go to diff View file
M plugins/docman/tests/unit/FilenamePattern/FilenamePatternFeedbackHandlerTest.php +2 −2 Go to diff View file
A plugins/docman/tests/unit/FilenamePattern/FilenamePatternRetrieverTest.php +57 −0 Go to diff View file
M plugins/docman/tests/unit/FilenamePattern/FilenamePatternUpdaterTest.php +18 −2 Go to diff View file
M plugins/docman/tests/unit/FilenamePattern/FilenamePatternValidatorTest.php +0 −1 Go to diff View file
M plugins/docman/tests/unit/Stubs/SettingsDAOStub.php +2 −1 Go to diff View file
M plugins/docman/themes/BurningParrot/css/admin.scss +8 −0 Go to diff View file
M plugins/docman/webpack.common.js +1 −0 Go to diff View file