stable

Clone or download

Read-only

feat: Add option to forbid Writers to update item

This option is hidden under a temporary feature flag (that should be removed in the next commit): add feature-flag-forbid-writers=1 in the docman ยป admin ยป permissions page url. The settings is saved, but not taken into effect yet. CSRF has been added to the form to secure it. Due to the fact that the form is still managed by legacy code, we had to cheat a little bit and move dom elements with some javascript. => to avoid flickering the form is hidden until the CSRF and other addendum have been inserted. Note: [reset to default] button has been removed. It prevents us to properly add the checkbox in the form (or we will have to bind the checkbox behavior to this button). Furthermore, except in PhpWiki, we don't have such buttons in permissions form in Tuleap. So, with Design Team's approval, we don't have anymore the reset button on docman permissions. Starts story #24980: forbid modifications of document properties by WRITERS Change-Id: If6b30a03f7e88435e02ae0b573cde96e0ce0186d

Modified Files

Name
M plugins/docman/db/install.sql +1 โˆ’0 Go to diff View file
A plugins/docman/db/mysql/updates/2022/202202141115_add_writers_allowed_to_update.php +44 โˆ’0 Go to diff View file
M plugins/docman/include/Docman_Actions.class.php +9 โˆ’0 Go to diff View file
M plugins/docman/include/Docman_Controller.class.php +1 โˆ’0 Go to diff View file
M plugins/docman/include/Docman_PermissionsManager.class.php +1 โˆ’1 Go to diff View file
M plugins/docman/include/Settings/SettingsDAO.php +21 โˆ’0 Go to diff View file
M plugins/docman/include/view/Docman_View_Admin_Permissions.class.php +26 โˆ’3 Go to diff View file
M plugins/docman/scripts/admin-permissions.ts +8 โˆ’1 Go to diff View file
M plugins/docman/site-content/fr_FR/LC_MESSAGES/tuleap-docman.po +12 โˆ’0 Go to diff View file
A plugins/docman/templates/admin/permissions-addendum.mustache +21 โˆ’0 Go to diff View file
M plugins/docman/themes/BurningParrot/css/admin.scss +16 โˆ’6 Go to diff View file