anchor.diff:  -include("ns_common.hrl").
   -include("rbac.hrl").
   
  --export([authenticate/1,
  -         has_permission/2,
  +-export([has_permission/2,
            get_accessible_buckets/2,
            extract_auth/1,
            extract_auth_user/1,
  
positive.code:                         true ->
                              {ok, {Username, bucket}};
                          false ->
                              case saslauthd_auth:authenticate(Username, Password) of
                                  true ->
                                      {ok, {Username, saslauthd}};
                                  false ->
                                      false;
                                  {error, Error} ->
                                      {error, Error}
                              end
                      end
              end
      end.
  
  -spec verify_login_creds(rbac_user_name(), rbac_password()) ->
  
negative.code:          validate_request/1,
           verify_login_creds/2,
           verify_rest_auth/2]).
  
  %% rpc from ns_couchdb node
  -export([authenticate/1,
           saslauthd_authenticate/2]).
  
  %% External API
  
  