anchor.diff:              case {Res, event_production_enabled("truncate_event")} of
                   {ok, true} ->
                       % async infrom other providers about modification
  -                    spawn(fun() -> mark_as_truncated(File, Size) end),  %todo get this info from events
  +                    Ctx = fslogic_context:get_user_context(),
  +                    spawn(fun() -> fslogic_context:set_user_context(Ctx), ok = mark_as_truncated(File, Size) end),  %todo get this info from events
   
                       TruncateEvent = [{"type", "truncate_event"}, {"user_dn", fslogic_context:get_user_dn()}, {"filePath", File}],
                       gen_server:call(?Dispatcher_Name, {cluster_rengine, 1, {event_arrived, TruncateEvent}});
  
positive.code:                     case {is_integer(Res), event_production_enabled("write_event")} of
                          {true, true} ->
                              % async infrom other providers about modification
                              spawn(fun() -> mark_as_modified(File, Offset, byte_size(Buf)) end), %todo get this info from events
  
                              WriteEvent = [{"type", "write_event"}, {"user_dn", fslogic_context:get_user_dn()},
                                  {"count", Res}, {"blocks", [{Offset, Res}]}],
  
negative.code:                     case {is_integer(Res), event_production_enabled("write_event"), EventPolicy} of
                          {true, true, generate_events} ->
                              % async infrom other providers about modification
                              Ctx = fslogic_context:get_user_context(),
                              spawn(fun() -> fslogic_context:set_user_context(Ctx), ok = mark_as_modified(File, Offset, byte_size(Buf)) end), %todo get this info from events
  
                              WriteEvent = [{"type", "write_event"}, {"user_dn", fslogic_context:get_user_dn()},
                                  {"count", Res}, {"blocks", [{Offset, Res}]}],
  