This issue has been created
There are 7 updates.
 
 
LLM AI Integration / cid:jira-generated-image-avatar-8a9ad3d2-6f96-4fdc-890c-5f16c339aecd LLMAI-133 Closed

PUT collection REST API returns 500 when rights check method configuration is omitted from request body

 
View issue   ยท   Add comment
 

Issue created

 
cid:jira-generated-image-avatar-ea3af7c2-0d7f-44c1-85b7-90333f483bcd Michael Hamann created this issue on 18/Mar/26 16:27
 
Summary: PUT collection REST API returns 500 when rights check method configuration is omitted from request body
Issue Type: cid:jira-generated-image-avatar-8a9ad3d2-6f96-4fdc-890c-5f16c339aecd Bug
Affects Versions: 0.7.2
Assignee: Unassigned
Created: 18/Mar/26 16:27
Priority: cid:jira-generated-image-static-major-683621c0-7812-4586-9b71-68cbb932df2b Major
Reporter: Michael Hamann
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

  1. 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.
  2. 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

 

 
 

7 updates

 
cid:jira-generated-image-avatar-ea3af7c2-0d7f-44c1-85b7-90333f483bcd Changes by Michael Hamann on 18/Mar/26 16:27
 
Fix Version: 0.8
Documentation in Release Notes: N/A
Documentation: N/A
Assignee: Michael Hamann
Resolution: Fixed
Tests: Unit
Status: Open Closed