Hi, I have some custom actions for updating data in my database. I want to capture the logged in person’s username or email that is carrying out the operation and log this to my database. Doesn’t seem to be a way to do this natively - is there a way to do this??
As far as I can find and are aware, there’s nowhere in Metabase where the Metabase user/email is exposed to the query flow. You need to get it into a filter somehow, then you can reference it from a query.
If you’re amendable to a paid plan, there may be a way to create hidden filters via tokens for Interactive Embedded auth, or use sandboxing/RLS, to get the Metabase auth info or some other identifier into a query. I’m not sure how RLS interacts with Actions, probably have to pose that to Metabase support.