Hi, Just wondering if there is a way to get the current user from the session context using groovy (within the layout.template of a custom unit)?
I know that you can specify a sub-unit UserCtxParam, or have the input.template provide the property explicitly but just wondering if it's available otherwise.
If the Java Service class's execute method you can get it like:
UserId = BeanHelper.asString(sessionContext.get(RTXConstants.CURRENT_USER_CTX_PARAM_KEY));
Outside the groovy script in the layout template you can get it like:
So it's there without having to declare it as an input property and having to explicitly pass it, but not sure how to access it in a groovy script (if it can be done).