OpenAssetIO / OpenAssetIO-Manager-BAL

A contrived "asset management system" for OpenAssetIO integration test cases.
Apache License 2.0
9 stars 6 forks source link

Validate access mode for API functions #66

Closed feltech closed 1 year ago

feltech commented 1 year ago

Closes https://github.com/OpenAssetIO/OpenAssetIO-Manager-BAL/issues/57. See corresponding PR https://github.com/OpenAssetIO/OpenAssetIO/pull/1050

https://github.com/OpenAssetIO/OpenAssetIO/issues/1016 refined the Context access patterns to formalize the creation of "children" and other related entities via publish to an existing reference. BAL does not yet support this kind of creation, and so should error in the case.

So respond appropriately to Access mode in various API functions, by calling the provided error callback, except in the case of managementPolicy which responds with empty TraitsData objects (signifying "unmanaged").

Note that for consistency, this changes the error message output when attempting to resolve with kWrite access.