diff --git a/rebar.lock b/rebar.lock index d21d7d3..c7a5d6d 100644 --- a/rebar.lock +++ b/rebar.lock @@ -2,7 +2,7 @@ [{<<"bear">>,{pkg,<<"bear">>,<<"0.9.0">>},2}, {<<"bouncer_proto">>, {git,"git@github.com:rbkmoney/bouncer-proto.git", - {ref,"8da12fe98bc751e7f8f17f64ad4f571a6a63b0fe"}}, + {ref,"cc50cc4549ce4598a023dea5b1ab0a25a449a2d0"}}, 0}, {<<"cache">>,{pkg,<<"cache">>,<<"2.3.3">>},1}, {<<"certifi">>,{pkg,<<"certifi">>,<<"2.6.1">>},2}, diff --git a/src/bouncer_context_v1.erl b/src/bouncer_context_v1.erl index fdfe70a..f26942b 100644 --- a/src/bouncer_context_v1.erl +++ b/src/bouncer_context_v1.erl @@ -61,29 +61,10 @@ from_thrift_context(Ctx) -> -spec try_upgrade(thrift_ctx_fragment()) -> thrift_ctx_fragment(). try_upgrade(#bctx_v1_ContextFragment{vsn = 1} = Ctx) -> - % TODO #ED-124 #ED-162 rbkmoney/bouncer-policies#46 - % tokens.replacement_ip -> client_info.ip - % удалить после выкатки capi_pcidss|bouncer-proto без bctx_v1_ContextTokens - ContextCAPI = - case Ctx#bctx_v1_ContextFragment.tokens of - #bctx_v1_ContextTokens{replacement_ip = undefined} -> - Ctx#bctx_v1_ContextFragment.capi; - #bctx_v1_ContextTokens{replacement_ip = IP} -> - CAPI = Ctx#bctx_v1_ContextFragment.capi, - Operation = CAPI#bctx_v1_ContextCommonAPI.op, - ClientInfo = #bctx_v1_ClientInfo{ip = IP}, - CAPI#bctx_v1_ContextCommonAPI{ - op = Operation#bctx_v1_CommonAPIOperation{ - client_info = ClientInfo - } - }; - _ -> - Ctx#bctx_v1_ContextFragment.capi - end, - Ctx#bctx_v1_ContextFragment{ - vsn = ?BCTX_V1_HEAD, - capi = ContextCAPI - }; + % no legacy data producers + % legacy structures have been removed + % nothing to update + Ctx#bctx_v1_ContextFragment{vsn = ?BCTX_V1_HEAD}; try_upgrade(#bctx_v1_ContextFragment{vsn = ?BCTX_V1_HEAD} = Ctx) -> Ctx.