-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Rest API
-
Release Notes Summary:Updating a group via the REST API do not reset the fields not passed in the JSON object
-
Backlog priority:800
-
Sprint:nxfit 9.3.10
-
Story Points:3
For instance, the parent groups are reset il updating a group without passing the "parentGroups" property:
- Create a "parent" group
http -a Administrator:Administrator POST http://localhost:8080/nuxeo/api/v1/groups entity-type=group id=parent
- Create a "child" group with "parent" as a parent group
http -a Administrator:Administrator POST http://localhost:8080/nuxeo/api/v1/groups entity-type=group id=child parentGroups:='["parent"]'
- Verify the parent/child relation
http -a Administrator:Administrator GET http://localhost:8080/nuxeo/api/v1/groups/child?fetch.group=parentGroups { "entity-type": "group", "grouplabel": "child", "groupname": "child", "id": "child", "parentGroups": [ "parent" ], "properties": { "description": null, "grouplabel": null, "groupname": "child", "tenantId": null } }
- Update the "child" group to add the "Administrator" user a a member
http -a Administrator:Administrator PUT http://localhost:8080/nuxeo/api/v1/groups/child entity-type=group id=child memberUsers:='["Administrator"]'
- Fetch the group with is member users and parent groups
http -a Administrator:Administrator GET http://localhost:8080/nuxeo/api/v1/groups/child?fetch.group=memberUsers,parentGroups { "entity-type": "group", "grouplabel": "child", "groupname": "child", "id": "child", "memberUsers": [ "Administrator" ], "parentGroups": [], "properties": { "description": null, "grouplabel": null, "groupname": "child", "tenantId": null } }
The parent groups have been reset.
See recent changes made for NXP-22542, but the issue was probably already there.
- depends on
-
NXP-22542 Can't use REST to alter a group custom field
- Resolved
- is required by
-
NXDRIVE-888 Fix random bug in test_group_changes.py
- Resolved