anchor.diff:  -spec get_user_dn() -> string().
   %% ====================================================================
   get_user_dn() ->
  -    try user_logic:get_dn_list(wf:session(user_doc)) of
  +    try user_logic:get_dn_list(gui_ctx:get_user_record()) of
           [] -> undefined;
           L when is_list(L) -> lists:nth(1, L);
           _ -> undefined
  
positive.code: -spec user_logged_in() -> boolean().
  %% ====================================================================
  user_logged_in() ->
      (wf:user() /= undefined).
  
  
  %% storage_defined/0
  
negative.code: maybe_redirect(NeedLogin, NeedDN, NeedStorage, SaveSourcePage) ->
      case NeedLogin and (not gui_utils:user_logged_in()) of
          true ->
              gui_jq:redirect_to_login(SaveSourcePage),
              true;
          false ->
              case NeedDN and (gui_utils:get_user_dn() =:= undefined) of
                  true ->
                      gui_jq:redirect(<<"/manage_account">>),
                      true;
                  false ->
                      case NeedStorage and (not gui_utils:storage_defined()) of
                          true ->
                              gui_jq:redirect(<<"/manage_account">>),
                              true;
                          false ->
                              false
  