<commit_before>%% -*- erlang-indent-level: 4;indent-tabs-mode: nil; fill-column: 92 -*-
%% ex: ts=4 sw=4 et
%% @author <NAME> <<EMAIL>>
%% @author <NAME> <<EMAIL>>
%% Copyright 2014 Chef, Inc. All Rights Reserved.

-module(oc_chef_authz_acl).

-include("oc_chef_types.hrl").
-include_lib("chef_objects/include/chef_types.hrl").



-export([acl_path/2,
         acl_path/3,
         acl_auth_path/3,
         fetch_id/4,
         fetch/2,
         has_grant_on/3,
         update_part/5]).


-define(DEFAULT_HEADERS, []).

% For getting out the ReqId for stats_hero: (not necessary once fetch_id is fixed for groups)
-record(context, {reqid :: binary(),
                  otto_connection,
                  darklaunch = undefined}).

update_part(Part, AceRecord, Type, AuthzId, OrgId) ->
    Ids = names_to_ids(ej:get({Part}, AceRecord), OrgId),
    Data = ejson:encode(Ids),<commit_msg>export fetch_cookbook_id<commit_after>%% -*- erlang-indent-level: 4;indent-tabs-mode: nil; fill-column: 92 -*-
%% ex: ts=4 sw=4 et
%% @author <NAME> <<EMAIL>>
%% @author <NAME> <<EMAIL>>
%% Copyright 2014 Chef, Inc. All Rights Reserved.

-module(oc_chef_authz_acl).

-include("oc_chef_types.hrl").
-include_lib("chef_objects/include/chef_types.hrl").



-export([acl_path/2,
         acl_path/3,
         acl_auth_path/3,
         fetch_id/4,
         fetch_cookbook_id/3,
         fetch/2,
         has_grant_on/3,
         update_part/5]).


-define(DEFAULT_HEADERS, []).

% For getting out the ReqId for stats_hero: (not necessary once fetch_id is fixed for groups)
-record(context, {reqid :: binary(),
                  otto_connection,
                  darklaunch = undefined}).

update_part(Part, AceRecord, Type, AuthzId, OrgId) ->
    Ids = names_to_ids(ej:get({Part}, AceRecord), OrgId),
    Data = ejson:encode(Ids),
{'fraction_non_alphanumeric': 0.15223386651958082, 'fraction_numerical': 0.01820187534473249, 'mean_word_length': 3.0044150110375276, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7118053', 'n_tokens_mistral': 678, 'n_tokens_neox': 637, 'n_words': 133}