User aware functions server side

hey guys,

In methods I can call the userId functions, so I know which user is calling the method. But wha if my method A calls function B server also server side? Does this function also has access to the userId or do I have to supply this via a parameter (e.g. generationUserId)?

example:
export function publishApp(appGuid, appName, streamId, customerName, generationUserId)

thanks

You’ll need to pass the userId unless you bind the function’s context to the method’s context (using bind, call or apply).

thanks! yeah, maybe is passing the parameter then easier to follow for other developers. Great, then I am going the correct path…

Simply try it and see for yourself :wink: