@Override
    public <T> T asUserResult(final UserRef userRef, final Supplier<T> supplier) {
        ensureValidUser(userRef);
        final UserIdentity userIdentity = new BasicUserIdentity(userRef);
        return asUserResult(userIdentity, supplier);
    }
Run the supplied code as the specified user.
stroom-security/stroom-security-impl/src/main/java/stroom/security/impl/SecurityContextImpl.java