anchor.diff:          Body -> Body
       end.
   
  -is_authorized_message(not_member_of_org, User, Org) ->
  +is_authorized_message(Type, User, Org) when Type =:= not_member_of_org;
  +                                            Type =:= bad_sig ->
       Msg = iolist_to_binary([<<"'">>, User, <<"' not authorized to search '">>,
                               Org, <<"'.">>]),
       {[{<<"error">>, [Msg]}]};
  
positive.code:                      State1#state{couchbeam = S,
                                    organization_guid = ?gv(org_guid, CertInfo)}};
                  {no_authn, Reason} ->
                      Msg = error_json(Reason),
                      Json = ejson:encode(Msg),
                      Req1 = wrq:set_resp_body(Json, Req),
                      {false, Req1, State1}
  
negative.code:         {true, Req, State#state{organization_guid = OrgGuid, solr_query = Query}}
      catch
          throw:org_not_found ->
              %% Not sure we can ever get here; user in org check will
              %% have failed with 401 if no such org.
              NoOrg = resource_exists_message(org_not_found, 
                                              wrq:path_info(organization_id, Req)),
              Req1 = wrq:set_resp_body(ejson:encode(NoOrg), Req),
              {false, Req1, State}
      end.
  