vitek Posted June 21, 2018 Report Posted June 21, 2018 Hello, I am trying to use dedicated API key, however I'd like to make publish look like it was done by a specific user. What's the best way of doing so? Thanks in advance! Cheers. Vit
Remus Avram Posted June 25, 2018 Report Posted June 25, 2018 Hi @vitek you can set the specific user to the "published by" attribute in the "Info" tab. I didn't find a way to change it in the "Activities" tab. Why are you using a dedicated API key for publishing?
Mattias Lagergren Posted June 26, 2018 Report Posted June 26, 2018 When you create the AssetVersion from the API you should be able to set the 'user_id' to another user: version = session.create('AssetVersion', {'asset_id': asset_id, 'user_id': another_user_id})
vitek Posted July 2, 2018 Author Report Posted July 2, 2018 @Mattias: Many thanks! @Remus: Original idea was just to simplify things - It takes care of making publish look like coming from the same username, which is logged on your system and you don't have to get the user API keys... if the system user and ftrack user names are matching ofcourse, so changing the name of the publish is hopefully just temporary patch
jen_at_haverstack Posted October 15, 2019 Report Posted October 15, 2019 Sorry to revive an old thread, but is there any way to change the user for the Activity also? The change suggested by @Mattias Lagergren definitely changes the "Published By" property, but the Activities tab for the Asset Version still shows "<api user> published..." instead of the user I specify in the `user_id`.
Guest Posted October 22, 2019 Report Posted October 22, 2019 Hi Jen, You'll want to find the Event object which was created in response to the publish and change the user_id. Unlike the info panel, the activity feed didn't seem to refresh automatically for me, so make sure to reload the page when you make your change. event = session.query( 'Event where action is "asset.published"' ' and parent_id is "{}"'.format( asset_version['id']) ).one() event['user_id'] = cool_user['id'] session.commit()
jen_at_haverstack Posted October 22, 2019 Report Posted October 22, 2019 That works! I guess I would have preferred to set the user on the event before it's created, but this is fine also. Thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.