anchor.diff:  
   %% External API
   
  -%% Respond with 401 Auth. required
  -require_auth(Req) ->
  -    case Req:get_header_value("invalid-auth-response") of
  -        "on" ->
  -            %% We need this for browsers that display auth
  -            %% dialog when faced with 401 with
  -            %% WWW-Authenticate header response, even via XHR
  -            menelaus_util:reply(Req, 401);
  -        _ ->
  -            menelaus_util:reply(Req, 401, [{"WWW-Authenticate",
  -                                            "Basic realm=\"Couchbase Server Admin / REST\""}])
  -    end.
  -
   get_accessible_buckets(Fun, Req) ->
       Identity = menelaus_auth:get_identity(Req),
       Roles = menelaus_roles:get_compiled_roles(Identity),
  
positive.code:     undefined = Req:get_header_value("menelaus-auth-src"),
      undefined = Req:get_header_value("menelaus-auth-token").
  
  store_user_info(_Req, _User, _Role, _Source, _Token) ->
      erlang:error(to_be_deleted).
  
  store_user_info(Req, {User, Src}, Token) ->
      Headers = Req:get(headers),
      H1 = mochiweb_headers:enter("menelaus-auth-user", User, Headers),
  
negative.code: 
  -include("ns_common.hrl").
  
  -export([has_permission/2,
           get_accessible_buckets/2,
           extract_auth/1,
           extract_auth_user/1,
           extract_ui_auth_token/1,
           complete_uilogin/2,
           reject_uilogin/2,
  