Details
-
Bug
-
Resolution: Fixed
-
Major
-
0.7.2
-
None
-
Unit
-
Unknown
-
N/A
-
N/A
-
Description
Summary
Sending a PUT request to update a collection that has a rights_check_method configured, without including rights_check_method_configuration in the request body, results in a 500 Internal Server Error. The update is completely rejected, even for unrelated fields.
Steps to reproduce
- Ensure a collection with a rights check method exists. In the following, it assumed that a collection "Sandbox" exists and the standard demo Admin user exists.
- Send a partial PUT updating only the title:
curl -u Admin:admin -X PUT -H "Content-Type: application/json" \ -d '{"title": "Sandbox"}' \ http://localhost:8080/xwiki/rest/wikis/xwiki/aiLLM/collections/Sandbox
Expected result:
HTTP 200 with the updated collection object; only the title field is changed, all other properties (including rights_check_method) remain unchanged.
Actual result:
HTTP 500 Internal Server Error. Server log shows:
ERROR .i.r.DefaultCollectionResource - Error updating collection [Sandbox]. org.xwiki.contrib.llm.IndexException: Authorization configuration object is not of the correct type [class java.lang.Object] at org.xwiki.contrib.llm.internal.DefaultCollection.setAuthorizationConfiguration(DefaultCollection.java:338) at org.xwiki.contrib.llm.rest.JSONCollection.applyTo(JSONCollection.java:115) at org.xwiki.contrib.llm.internal.rest.DefaultCollectionResource.putCollection(DefaultCollectionResource.java:94