-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Low
-
Component/s: Permissions - Space
-
None
-
2
-
Severity 3 - Minor
-
1
-
Warranty
Issue Summary
If a Confluence Cloud site has the new roles experience enabled, attempts to create a space using the v1 endpoint fails if the payload contains data that defines permissions to that new space during its creation.
Steps to Reproduce
- Enable the Roles feature preview.
- Using the v1 Create Space endpoint, attempt to create a space. In the payload of the request, we need to send the permissions array:
{ "key": "newTest0223", "name": "newTest0223", "description": {}, "permissions": [ { "subjects": { "user": { "results": [ { "type": "user", "accountId": "USER-ID" } ], "size": 1 } }, "operation": { "operation": "create", "targetType": "blogpost" }, "anonymousAccess": false, "unlicensedAccess": false } ] }
Expected Results
The space is created with the permissions defined in the request.
Actual Results
Space creation fails. The request receives a 500 response with the following error:
{
"statusCode": 500,
"message": "org.springframework.dao.DuplicateKeyException: A different object with the same identifier value was already associated with the session : [com.atlassian.confluence.spaces.SpaceDescription#54198273]; nested exception is org.hibernate.NonUniqueObjectException: A different object with the same identifier value was already associated with the session : [com.atlassian.confluence.spaces.SpaceDescription#54198273]"
}
Workaround
Currently, the only known workaround is to remove the space permissions array from the payload and set the permissions in a separate request.
- relates to
-
CONFCLOUD-83797 Using Create Space endpoint with Roles & Permissions errors out
-
- In Progress
-