Skip to content

Commit

Permalink
resolve acls for trusted (2600hz#6508)
Browse files Browse the repository at this point in the history
  • Loading branch information
lazedo authored May 1, 2020
1 parent 6117aad commit 127bbf5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions applications/ecallmgr/src/ecallmgr_fs_acls.erl
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,13 @@ system_config_acls(Node) ->
{'error', Error} ->
lager:warning("error getting system acls : ~p", [Error]),
kz_json:new();
JObj -> resolve_system_config_acls(JObj)
JObj -> resolve(JObj)
end.

resolve_system_config_acls(JObj) ->
kz_json:map(fun resolve_system_config_acls/2, JObj).
resolve(JObj) ->
kz_json:map(fun resolve/2, JObj).

resolve_system_config_acls(K, JObj) ->
resolve(K, JObj) ->
CIDR = kz_json:get_value(<<"cidr">>, JObj),
{K, kz_json:set_value(<<"cidr">>, maybe_resolve_cidr(CIDR), JObj)}.

Expand Down Expand Up @@ -202,7 +202,7 @@ trusted_acls(Node) ->
{'error', Error} ->
lager:warning("error getting system acls : ~p", [Error]),
kz_json:new();
JObj -> kz_json:filtermap(fun trusted_acl/2, JObj)
JObj -> resolve(kz_json:filtermap(fun trusted_acl/2, JObj))
end.

-spec trusted_acl(kz_term:ne_binary(), kz_json:object()) -> boolean() | {'true', kz_json:object()}.
Expand Down

0 comments on commit 127bbf5

Please sign in to comment.