stable

Clone or download

Read-only

Link's approval table can be mixed up with the approval table of files

The approval table DB table does not distinguish between the version ID of files and embedded files and the version ID of links. Unfortunately, Files and links does not use the same version ID key and as a result a same version ID value can match both a file and a link so a same approval table can become shared between two different items. In the situation where the both a file or a link can be the target of an approval table, this contribution marks the table as corrupted and a warning message is displayed. request #13118: approval tables can share same id regardless of their types Change-Id: If076a81b575bd92863254acf4bf2771e5a912d30

Modified Files

Name
M plugins/docman/db/install.sql +4 −0 Go to diff View file
A plugins/docman/db/mysql/updates/2019/201907191700_move_link_version_column_approval.php +131 −0 Go to diff View file
M plugins/docman/include/ApprovalTable/ApprovalTable.class.php +15 −4 Go to diff View file
A plugins/docman/include/ApprovalTable/HasPotentiallyCorruptedApprovalTable.php +127 −0 Go to diff View file
M plugins/docman/include/ApprovalTable/Item/ItemDao.class.php +8 −5 Go to diff View file
M plugins/docman/include/ApprovalTable/Link/Link.class.php +16 −6 Go to diff View file
M plugins/docman/include/ApprovalTable/Link/LinkDao.class.php +3 −3 Go to diff View file
M plugins/docman/include/ApprovalTable/Link/LinkFactory.class.php +1 −1 Go to diff View file
M plugins/docman/include/ApprovalTable/Reminder.class.php +2 −0 Go to diff View file
M plugins/docman/include/view/Docman_View_ItemDetailsSectionApproval.class.php +13 −0 Go to diff View file
A plugins/docman/phpunit/ApprovalTable/HasPotentiallyCorruptedApprovalTableTest.php +177 −0 Go to diff View file
M plugins/docman/site-content/fr_FR/LC_MESSAGES/tuleap-docman.po +8 −0 Go to diff View file
M plugins/docman/tests/rest/Helper/DocmanDataBuildCommon.php +4 −4 Go to diff View file
M plugins/docman/tests/rest/Helper/DocmanLinkDataBuild.php +1 −1 Go to diff View file