Sindre
Sindre14mo ago

find the current App user from a script/flow

If I'm running a flow that is executed from an app. WM_EMAIL is the email from the user that has deployed the app. Is it possible to get the current user? I know i can get the current user by sending the ctx.email but how do I ensure that a user do not modify this, or just call the api directly with another value? Is this handled with regards to security ?
3 Replies
rubenf
rubenf14mo ago
ctx.email cannot be modified however yes I suppose you could call the executeComponent by hand if that's a dynamic input Can you try WM_USERNAME ? WM_USERNAME should correspond to the one of the user
Sindre
Sindre14mo ago
yes, then I can map that from username to email by using this endpoint-https://app.windmill.dev/openapi.html#/operations/listUsers
rubenf
rubenf14mo ago
yup