State:Closed|TargetRelease:No Target|icon_bug|icon_katana|database:public|Resolution:Fixed|BugID:352562|
Problem summary:
Publishing a LiveGroup where:
fails with an error message. Whether the file associated with the asset can be overwritten should be determined by the Asset Plugin, but no calls to checkPermissions() occur.
(This particularly affects the possible case where an Asset Plugin is changing file permissions to provide rogue edits. Such a plugin could allow writing to the file in AssetAPI::createAssetAndPath() before the file is written to and updated, and return it to read-only in AssetAPI::postCreateAsset.)
Steps to reproduce:
Reproduction steps using the PyMockAsset plugin:
I'm using the PyMockAsset plugin from plugins/Resources/Examples (which I added to KATANA_RESOURCE_PATH), and setting the environment variable MOCK_ASSET_DIR to a scratch directory where it should store files. I've also set MOCK_DEBUG=True to enable logging to the console.
1. Launch Katana, starting with an empty node-graph.
2. In the Project Setting tab, select the PyMockAsset plugin.
3. Create a new group node, and make it a Live Group from it's context menu.
4. From the live group's context menu, select "Publish and Finish Editing Contents", and in the popup dialog select the tab for the PyMockAsset plugin - fill out it's fields - and select Accept to publish.
5. Set the saved files as read-only. (For me, that's the *.livegroup file written to a subdirectory of MOCK_ASSET_DIR.)
6. Select "Edit Contents" from the Live Group's context menu.
7. From the live group's context menu, select "Publish and Finish Editing Contents" again, and select Accept try to overwrite the files.
After step (7), I'm asked whether I wish to overwrite the file. If I select Overwrite, then I get an error dialog about Katana being unable to overwrite the asset.
Running 'strace', and looking at the log output from PyMockAsset I can see Katana is checking whether the file is writable immediately *before* the Overwrite dialog is shown. (After that dialog would be accepted, createAssetAndPath and other Asset Plugin methods would be called.)
Expected behaviour:
The Asset Plugin's checkPermissions() function should be used instead of checking the file directly.
Actual behaviour:
Katana fails to publish the LiveGroup with an error dialog indicating that it is not writable.
Workaround:
No known workaround.
Please note: https://support.foundry.com/hc/en-us/articles/360001321620-Q100444-The-Deprecation-of-Python-based-AssetAPI-plug-ins-in-Katana-4-5v1-and-onwards
(Keeping the *.livegroup file writable at least allows overwriting the asset to succeed, but the asset plugin will still not be asked whether access is allowed.)
Reproduced by support
This bug has been reproduced in:
Earliest version tested
Katana4.0v8- This issue appears to be in all tested versions of the product
We're sorry to hear that
Please tell us why