Details
-
Bug
-
Resolution: Fixed
-
Major
-
1.9.4
-
None
-
patch
-
Unknown
-
Description
The almost unmaintained query plugin was written without respect to the rules that the plugin is a singleton and the plugin API is an instance to be used in the current context.
Both the API and plugin where using the same context, that was the initial context of the plugin singleton instance. This is obviously wrong, but works pretty well in an XE (not a XEM). The API functions were doing rights checking but on the wrong context.
Without breaking current behaviour, the attached patch fix the context usage and deprecate the wrong usage. This will ensure no breakage in current code that was using the broken version of the plugin itself (not the API) or event those who gets the API manually (not using the plugin dedicated function).
It also adds the hability for authors with programmings rights, to skip rights checking which is the equivalent to using the plugin directly but now with the appropriate context for access to databases objects in a XEM.
Note that we have used the broken plugin successfully under XEM 1.2 (based on XE 1.4) and that was a migration to 1.9 that has reveal this issue. I have not found valid explanation for that !
Attachments
Issue Links
- relates to
-
XWIKI-4585 Fix search mode display of fields, and also fix id/for attributes of boolean in forms
- Closed