Allow access to certain state modifying commands when granted permissions

While upgrading from a legacy extension to a UXP panel, I ran into a bit of a showstopper.
A handful of commands have now been gated behind a requirement for a “modal scope”. Examples include app.bringToFront(), the make document batchPlay command, etc.

Part of our workflow involves listening to secure websocket commands from external sources, and reacting to those commands to create documents, download images, create new artboards, etc.

Gating those behind modals every time will prove to be a subpar user experience.

Unless I’m missing something, I’m not sure there’s an elegant way around this (nor, do I expect, is there intended to be).

Can we add a feature that, similar to the session tokens for accessing the disk, asks the user if the plugin can modify the state of photoshop and allow these types of commands?

If there’s something I’m missing here as well, please let me know!

Example failed batchPlay command:

If anyone else runs into this issue and has the same worries I did…

Worry not!

A) Here’s the documentation, which I had some trouble tracking down

B) It doesn’t require permissions. :slight_smile:

C) You may be able to scrap some of your own UI intended to handle loading states :joy: