Describe the bug
remove_permissions_from_assortment answers succeeded: 1, failed: 0 and leaves the permission row in place. remove_shops_from_assortment does the same for the shop relation. The matching assign_* tools work. A caller that revokes a user group's access to an assortment, or takes an assortment off a shop, is told it succeeded while the grant stays active.
To Reproduce
save_user_groups {"groups":[{"id":0,"name":"TEST-GROUP","parentGroupId":0}]}. Note the group id G.
save_assortments {"assortments":[{"id":"TEST-ASRT","name":"TEST-ASRT","active":false}]}.
assign_permissions_to_assortment {"permissions":[{"assortmentId":"TEST-ASRT","userId":G}]}.
get_assortment_permissions {"assortmentId":"TEST-ASRT"}: one row.
remove_permissions_from_assortment {"permissions":[{"assortmentId":"TEST-ASRT","userId":G}]} (also tried with the autoId from step 4).
get_assortment_permissions again, and SELECT * FROM EcomAssortmentPermissions WHERE AssortmentPermissionAssortmentID='TEST-ASRT'.
assign_shops_to_assortment {"relations":[{"assortmentId":"TEST-ASRT","shopId":"SHOP1"}]}, then remove_shops_from_assortment with the same payload, then SELECT * FROM EcomAssortmentShopRelations WHERE AssortmentShopRelationAssortmentID='TEST-ASRT'.
Observed (DW 10.28.11, MCP add-in 0.6.0-BETA):
assign_permissions_to_assortment -> {"succeeded":1,"failed":0,"skipped":0,"errors":[]}
get_assortment_permissions -> {"count":1,"data":[{"autoId":1,"assortmentId":"TEST-ASRT","userId":100104}]}
remove_permissions_from_assortment -> {"succeeded":1,"failed":0,"skipped":0,"errors":[]}
remove_permissions_from_assortment (with autoId:1) -> {"succeeded":1,"failed":0,"skipped":0,"errors":[]}
get_assortment_permissions -> {"count":1,"data":[{"autoId":1,"assortmentId":"TEST-ASRT","userId":100104}]}
EcomAssortmentPermissions -> TEST-ASRT | 100104 | 1 (row still present)
assign_shops_to_assortment -> succeeded 1; EcomAssortmentShopRelations: TEST-ASRT | SHOP1 | 1
remove_shops_from_assortment -> {"succeeded":1,"failed":0,"skipped":0,"errors":[]}
EcomAssortmentShopRelations -> TEST-ASRT | SHOP1 | 1 (row still present)
delete_assortments on the assortment removes both rows, so the only way to revoke one grant over MCP is to delete and rebuild the whole assortment.
Expected behavior
The named permission row and shop relation are deleted, and get_assortment_permissions no longer lists them. If a row does not match, the result reports it under skipped or errors instead of succeeded.
Environment
- Dynamicweb 10.28.11 (.NET 10 hosting)
- MCP add-in 0.6.0-BETA
Describe the bug
remove_permissions_from_assortmentanswerssucceeded: 1, failed: 0and leaves the permission row in place.remove_shops_from_assortmentdoes the same for the shop relation. The matchingassign_*tools work. A caller that revokes a user group's access to an assortment, or takes an assortment off a shop, is told it succeeded while the grant stays active.To Reproduce
save_user_groups {"groups":[{"id":0,"name":"TEST-GROUP","parentGroupId":0}]}. Note the group id G.save_assortments {"assortments":[{"id":"TEST-ASRT","name":"TEST-ASRT","active":false}]}.assign_permissions_to_assortment {"permissions":[{"assortmentId":"TEST-ASRT","userId":G}]}.get_assortment_permissions {"assortmentId":"TEST-ASRT"}: one row.remove_permissions_from_assortment {"permissions":[{"assortmentId":"TEST-ASRT","userId":G}]}(also tried with theautoIdfrom step 4).get_assortment_permissionsagain, andSELECT * FROM EcomAssortmentPermissions WHERE AssortmentPermissionAssortmentID='TEST-ASRT'.assign_shops_to_assortment {"relations":[{"assortmentId":"TEST-ASRT","shopId":"SHOP1"}]}, thenremove_shops_from_assortmentwith the same payload, thenSELECT * FROM EcomAssortmentShopRelations WHERE AssortmentShopRelationAssortmentID='TEST-ASRT'.Observed (DW 10.28.11, MCP add-in 0.6.0-BETA):
delete_assortmentson the assortment removes both rows, so the only way to revoke one grant over MCP is to delete and rebuild the whole assortment.Expected behavior
The named permission row and shop relation are deleted, and
get_assortment_permissionsno longer lists them. If a row does not match, the result reports it underskippedorerrorsinstead ofsucceeded.Environment