public void resolve(final UserRef userRef, final Consumer<UserRef> consumer) {
        if (userRef == null || userRef.getUuid() == null) {
            consumer.accept(userRef);
        } else {
            restFactory
                    .create(RESOURCE)
                    .method(res -> res.getUserByUuid(userRef.getUuid()))
                    .onSuccess(consumer)
                    .onFailure(new DefaultErrorHandler(this, () -> consumer.accept(userRef)))
                    .taskMonitorFactory(pagerView)
                    .exec();
        }
    }
For selecting a username to add a user to a permissions set or selecting a user to add to a group.
For internal IDP this will list users from account and stroom_user combined.
For external IDP this will list users from stroom_user only and users on the IDP but not in
stroom_user will have to be manually added to the list.
stroom-core-client/src/main/java/stroom/security/client/presenter/UserRefPopupPresenter.java