private void onEnabledStateChange(final boolean isEnabled) {
        if (userRef != null) {
            if (isEnabled != userRef.isEnabled()) {
                restFactory
                        .create(USER_RESOURCE)
                        .method(resource -> resource.fetch(userRef.getUuid()))
                        .onSuccess(user -> {
                            if (isEnabled != user.isEnabled()) {
                                user.setEnabled(isEnabled);
                                restFactory
                                        .create(USER_RESOURCE)
                                        .method(resource -> resource.update(user))
                                        .onSuccess(aVoid ->
                                                userRef = user.asRef())
                                        .taskMonitorFactory(this)
                                        .exec();
                            }
                        })
                        .taskMonitorFactory(this)
                        .exec();
            }
        }
    }
The Info sub-tab of UserTabPresenter
stroom-core-client/src/main/java/stroom/security/client/presenter/UserInfoPresenter.java