Details
-
Improvement
-
Resolution: Fixed
-
Major
-
15.8-rc-1
-
None
Description
Currently, there is a single pre-edit check: a message is displayed to the user before editing if the document belongs to an extension.
We have identified a growing need for this kind of checks for other reasons.
For instance, raise a warning if editing the document would lead to broken macro because the current user does not have enough (e.g., script) rights.
Consequently, is is interesting to provide a way for extensions to contribute their own pre-edit checks.
Impacted code:
- https://github.com/xwiki/xwiki-platform/blob/2eecf3f823b449da666d906e3edd81d7d8b5813f/xwiki-platform-core/xwiki-platform-edit/xwiki-platform-edit-ui/src/main/resources/XWiki/InplaceEditing.xml#L43
- https://github.com/xwiki/xwiki-platform/blob/6b7c93ebed6e0172017d58e46db0a6129f484afd/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-skin/xwiki-platform-flamingo-skin-resources/src/main/resources/flamingo/edit.vm#L35
Other use cases that would benefit from this page protection check:
- modification of mandatory documents (especially delete)
- Replication extension needs it to protect pages which are only replicated one way (REPLICAT-113)
Attachments
Issue Links
- blocks
-
REPLICAT-113 Better protect readonly pages from editing
- Open
- relates to
-
XWIKI-21308 No warning when an in-place field from a page belonging to an extension is edited
- Open
-
XWIKI-21309 No warning when rollbacking a page belonging to an extension
- Open
-
XWIKI-21311 Introduce a required rights analyzer
- Closed