[xwiki-contrib/documentation] a817ac: DA-109: Improve how the documentation analysis sav...
Branch: refs/heads/vmassol/DA-109-113 Home: https://github.com/xwiki-contrib/documentation Commit: a817ac48d5419eb4b6bb3294073efe685e9a1fd7 https://github.com/xwiki-contrib/documentation/commit/a817ac48d5419eb4b6bb32... Author: Vincent Massol <[email protected]> Date: 2026-10-15 (Thu, 15 Oct 2026) Changed paths: M documentation-api/src/main/java/org/xwiki/contrib/documentation/internal/DefaultDocumentationManager.java M documentation-api/src/test/java/org/xwiki/contrib/documentation/test/DefaultDocumentationManagerTest.java Log Message: ----------- DA-109: Improve how the documentation analysis saves violation objects * When saving the violation xobjects, set only the original metadata author of the analysed page to superadmin, so that the history shows the save as made by the system, and keep the effective metadata author, the content author and the creator unchanged. * Add a unit test checking that only the original metadata author is changed when the analysis saves violations. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Commit: bfa577628cbf2cebb8fc194b2673292c650ed570 https://github.com/xwiki-contrib/documentation/commit/bfa577628cbf2cebb8fc19... Author: Vincent Massol <[email protected]> Date: 2026-10-15 (Thu, 15 Oct 2026) Changed paths: M documentation-api/src/main/java/org/xwiki/contrib/documentation/internal/FalsePositives.java M documentation-api/src/test/java/org/xwiki/contrib/documentation/internal/FalsePositivesTest.java Log Message: ----------- DA-110: Improve how false positive marks are saved * When saving the marked and unmarked violation xobjects, set only the original metadata author of the page to the current user, so that the history shows the change as made by the user who marked or unmarked them, and keep the effective metadata author, the content author and the creator unchanged. * Check in the unit tests that only the original metadata author is changed when marking, unmarking and marking all violations. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Commit: 9a722133be029532758d72b3ff0f7219592a71cc https://github.com/xwiki-contrib/documentation/commit/9a722133be029532758d72... Author: Vincent Massol <[email protected]> Date: 2026-10-15 (Thu, 15 Oct 2026) Changed paths: M documentation-api/src/main/java/org/xwiki/contrib/documentation/DocumentationManager.java M documentation-api/src/main/java/org/xwiki/contrib/documentation/internal/DefaultDocumentationManager.java M documentation-api/src/main/java/org/xwiki/contrib/documentation/script/DocumentationScriptService.java M documentation-api/src/test/java/org/xwiki/contrib/documentation/script/DocumentationScriptServiceTest.java M documentation-api/src/test/java/org/xwiki/contrib/documentation/test/DefaultDocumentationManagerTest.java M documentation-ui/src/main/resources/DocApp/Code/DocumentationDocextra.xml M documentation-ui/src/main/resources/DocApp/Code/DocumentationSheet.xml Log Message: ----------- DA-111: Improve how the documentation sheet triggers the analysis of a page * DocumentationSheet: only run the analysis for a POST request carrying a valid form token, sent by a user having the Edit right on the page. * DocumentationDocextra: send the form token with the "Validate" form. * DocumentationScriptService#analyse: return false without analysing when the current user doesn't have the Edit right on the page. * DefaultDocumentationManager#analyse: return false without analysing or saving when the page is not a documentation page (see DocumentationPages#isAnalysable), like the save listener and the analysis of all pages already do. * Add unit tests for both cases. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Commit: 36fc0599421cd9f7add2f4413cbeb5fd80887070 https://github.com/xwiki-contrib/documentation/commit/36fc0599421cd9f7add2f4... Author: Vincent Massol <[email protected]> Date: 2026-10-15 (Thu, 15 Oct 2026) Changed paths: M documentation-api/src/main/java/org/xwiki/contrib/documentation/internal/livedata/ViolationsLiveDataEntryStore.java M documentation-api/src/main/java/org/xwiki/contrib/documentation/internal/livedata/ViolationsLiveDataQueryHelper.java M documentation-api/src/test/java/org/xwiki/contrib/documentation/internal/livedata/ViolationsLiveDataEntryStoreTest.java M documentation-api/src/test/java/org/xwiki/contrib/documentation/internal/livedata/ViolationsLiveDataQueryHelperTest.java Log Message: ----------- DA-112: Improve the query of the Documentation Violations Live Data * ViolationsLiveDataQueryHelper: keep only the violations of the pages that the current user can view (checking the rights once per page), and return them unpaginated; remove the separate count query. * ViolationsLiveDataEntryStore: compute the count and the requested page of entries from these violations, so that the count, the entries and the filters all apply to the same viewable violations. * ViolationsLiveDataEntryStore: only set the entry identifier once the page is known to be viewable. * Update the unit tests and add tests for the view right filtering and the pagination. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Commit: 4bdae3138e81cb54fa164c979bc1b07ab89508e2 https://github.com/xwiki-contrib/documentation/commit/4bdae3138e81cb54fa164c... Author: Vincent Massol <[email protected]> Date: 2026-10-15 (Thu, 15 Oct 2026) Changed paths: M documentation-api/src/main/java/org/xwiki/contrib/documentation/script/DocumentationScriptService.java M documentation-api/src/test/java/org/xwiki/contrib/documentation/script/DocumentationScriptServiceTest.java Log Message: ----------- DA-113: Improve the context saved by the "Check all pages" job * Remove "request.contextpath" from the context entries saved in the job request: it's not an entry supported by the context store (which then saves the whole request), and the context path is already part of the saved request URL. * getCheckAllPagesStatus: return null when the current user doesn't have the Admin right on the current wiki, like checkAllPages and cancelCheckAllPages require it. * Add unit tests for the saved context entries and for the status when the current user is not a wiki administrator. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Compare: https://github.com/xwiki-contrib/documentation/compare/a817ac48d541%5E...4bd... To unsubscribe from these emails, change your notification settings at https://github.com/xwiki-contrib/documentation/settings/notifications
participants (1)
-
XWiki Notifications