Hi Samuli,
thank you for your feedback! The problem is, that I have no influence on the client side, i.e. I have only one request, which should be answered in the synchronous way.
However just as you, because of security reasons, I didn't really elieve that there is some way to do this, but I found out, that it's possible (thx @ Sergei Haller for the tip). Here the code snippet:
IUser userB= UMFactory.getUserFactory().getUserByLogonID("userB"); Subject subject = new Subject( true, new HashSet<IUser>(Arrays.asList(new IUser[] { userB})), Collections.emptySet(), Collections.emptySet()); Subject.doAs(subject, new PrivilegedAction<String>() { @Override public String run() { // do the stuff of the method Y } });
Thank you and best regards,
Artem