Our projects use extensive jython scripting to do databasing etc. In our database there are certain fields that provide information like : Created_by, Modified_By. In order to fill these fields we need to get the current username of the active session.
I know it is possible to use session.props to get the current user. But from our jython code we don’t have access to this property. Is there anyway we can access this property through a scripting method? I would prefer not to pass self or session to the business logic (to avoid cluttering of the code)
I guess scripts like system.perspective.IsAuthorized() need to have access to the current user in order to perform there logic. So probably there should be a way to do this?
Any ideas / help would greatly be appreciated.