Required Rights
New APIs have been introduced for required rights, a new mechanism for explicitly marking which rights the content of a document needs.
This provides two protections:
- Restricting script executions in documents where scripts haven't explicitly been enabled,
- Preventing users without script, admin, or programming right from editing documents that require these rights.
For now, this is a developer-only change, required rights aren't enforced by default and there is no UI (a UI is planned for a following release). Developers whose extensions depend on XWiki 16.10.0+ are encouraged to start using the new document authorization manager when checking the rights of document authors, e.g., when registering a component based on an XObject.
Extensions can also start enforcing required rights on their documents, marking which pages need wiki admin or programming right for example and check if their extensions still work when enabling enforcing required rights for these documents.
The XAR Format Specification has been adapted, accordingly. If not done already, required rights analyzers should be implemented for all XObjects and macros that need rights beyond what's covered by standard fields. This includes for example the interpretation of Velocity code in fields that aren't marked as containing Velocity code, or requiring wiki admin right for certain scope values. Those analyzers are necessary to allow suggesting the user all rights that are required by a page.