anchor.diff:              done
       end.
   
  -handle_pool_info_wait_tail(Req, Id, UserPassword, LocalAddr, ETag) ->
  +handle_pool_info_wait_tail(Req, Id, LocalAddr, ETag) ->
       menelaus_event:unregister_watcher(self()),
       %% consume all notifications
       consume_notifications(),
       %% and reply
  -    {struct, PList} = build_pool_info(Id, UserPassword, for_ui, LocalAddr),
  +    {struct, PList} = build_pool_info(Id, menelaus_auth:is_under_admin(Req),
  +                                      for_ui, LocalAddr),
       Info = {struct, [{etag, list_to_binary(ETag)} | PList]},
       reply_json(Req, Info),
       %% this will cause some extra latency on ui perhaps,
  
positive.code:     end.
  
  handle_pool_info(Id, Req) ->
      UserPassword = menelaus_auth:extract_auth(Req),
      LocalAddr = menelaus_util:local_addr(Req),
      Query = Req:parse_qs(),
      WaitChangeS = proplists:get_value("waitChange", Query),
      PassedETag = proplists:get_value("etag", Query),
      case WaitChangeS of
          undefined -> reply_json(Req, build_pool_info(Id, UserPassword, normal, LocalAddr));
          _ ->
              WaitChange = list_to_integer(WaitChangeS),
              menelaus_event:register_watcher(self()),
              erlang:send_after(WaitChange, self(), wait_expired),
              handle_pool_info_wait(Req, Id, UserPassword, LocalAddr, PassedETag)
      end.
  
  handle_pool_info_wait(Req, Id, UserPassword, LocalAddr, PassedETag) ->
      Info = mochijson2:encode(build_pool_info(Id, UserPassword, stable, LocalAddr)),
      ETag = integer_to_list(erlang:phash2(Info)),
      if
          ETag =:= PassedETag ->
              erlang:hibernate(?MODULE, handle_pool_info_wait_wake,
                               [Req, Id, UserPassword, LocalAddr, PassedETag]);
          true ->
              handle_pool_info_wait_tail(Req, Id, UserPassword, LocalAddr, ETag)
      end.
  
  handle_pool_info_wait_wake(Req, Id, UserPassword, LocalAddr, PassedETag) ->
      receive
          wait_expired ->
              handle_pool_info_wait_tail(Req, Id, UserPassword, LocalAddr, PassedETag);
          {notify_watcher, _} ->
              timer:sleep(200), %% delay a bit to catch more notifications
              consume_notifications(),
              handle_pool_info_wait(Req, Id, UserPassword, LocalAddr, PassedETag);
          _ ->
              exit(normal)
      end.
  
negative.code:     exit(normal).
  
  
  build_pool_info(Id, IsAdmin, InfoLevel, LocalAddr) ->
      UUID = get_uuid(),
  
      F = build_nodes_info_fun(IsAdmin, InfoLevel, LocalAddr),
      Nodes = [F(N, undefined) || N <- ns_node_disco:nodes_wanted()],
      Config = ns_config:get(),
      BucketsVer = erlang:phash2(ns_bucket:get_bucket_names(Config))
  