anchor.diff:                      NewCon = Conn#ddConn{id=Id},
                       ?Info("adding new connection ~p", [NewCon]),
                       check_save_conn(UserSess, DalSess, insert, NewCon);
  -                _ -> Conn
  +                _ -> {error, <<"Create connections unauthorized">>}
               end
       end;
   add_connect_internal(UserSess, DalSess, #ddConn{id = OldId, owner = Owner} = Conn)
  
positive.code:             {error, <<"Error saving the connection">>}
      end.
  
  -spec check_save_conn({atom(), pid()}, {atom(), pid()}, atom(), #ddConn{}) -> #ddConn{} | {error, binary()}.
  check_save_conn(UserSess, DalSess, Op, Conn) ->
      case UserSess:run_cmd(Op, [ddConn, Conn]) of
          {error, {{Exception, M}, _Stacktrace} = Error} ->
              ?Error("~p connection failed : ~n~p", [Op, Error]),
  
negative.code:     case UserSess:run_cmd(select, [ddConn, [{#ddConn{id=OldId, _='_'}, [], ['$_']}]]) of
          {[#ddConn{owner = OldOwner} = OldCon], true} ->
              %% Save the conn only if there is some difference.
              case is_same_conn(OldCon, Conn) of
                  true ->
                      %% If the connection is not changed then do not save a copy.
                      OldCon#ddConn{owner = get_name(DalSess, OldCon#ddConn.owner)};
                  false ->
                      if
                          Owner =:= OldOwner -> %% Same owner update the connection.
                             check_save_conn(UserSess, DalSess, update, {OldCon, Conn});
                         true -> %% Different owner, create a copy.
                             add_connect_internal(UserSess, DalSess, Conn#ddConn{id = null})
  