"Run"ing a Scheduled Bot from the editor, with user-dependent Security Filters

I just discovered, or perhaps re-discovered after forgetting, that when you manually "Run" a Scheduled Bot from the editor, it runs on the data set that is currently loaded into your editor's "session", or in other words, whatever is currently loaded in the emulator. They do NOT get run in the context that they typically would be run during their normal schedule.

To explain further: I have a Security Filter that only loads certain records based on the user's permissions. But I also added an override to the Security Filter for Bots to run on the full table, with CONTEXT("Host") = "Server"

But manually running the bot from the editor didn't seem to take that override into account. What I had to do is change my current user's permission settings within the emulator to load the additional records into my "session", then re-run the bot.

Just documenting my discovery in case it helps someone else.

 

Edit:

Using CONTEXT("Host")="Server" as an override in a Security Filter doesn't work. Security Filters are evaluated by the server, just like Virtual Columns, so CONTEXT("Host") will always return "Server" in such cases. Trying to use this could easily put a giant hole in your app's security ๐Ÿ˜ฎ. The main part of this tip post still stands though.

7 2 144
2 REPLIES 2

Thank you!

Thank you @Marc_Dillon for this tip. You can enable "Bypass Security Filters?" in the bot. With that, the bot runs on every row. Would that be good for you?

Top Labels in this Space