anchor.diff:  invert_perm(Other) ->
       Other.
   
  -
   check_permission(AuthzObjectType, AuthzId, Req, #base_state{reqid=ReqId,
                                                               requestor=RequestorId}=State) ->
       Perm = http_method_to_authz_perm(wrq:method(Req)),
  
positive.code:                             <<"' as a member of organization '">>,
                              Org, <<"'">>]),
      {[{<<"error">>, [Msg]}]}.
  
  
  
  content_types_provided(Req, State) ->
      {[{"application/json", to_json}], Req, State}.
  
negative.code: port_string(Port) ->
      [$:|erlang:integer_to_list(Port)].
  
  %% Tells whether this user is the superuser.
  is_superuser(UserName) ->
      case application:get_env(chef_rest, superusers) of
          {ok,Superusers} -> lists:member(UserName, Superusers);
          undefined -> false
      end.
  
  %% Get the username from the request (and tell whether it is a superuser)
  get_user(Req, #base_state{superuser_bypasses_checks = SuperuserBypassesChecks}) ->
      UserName = list_to_binary(wrq:get_req_header("x-ops-userid", Req)),
      BypassesChecks = SuperuserBypassesChecks andalso is_superuser(UserName),
      {UserName, BypassesChecks}.
  