Remove "current_password" but keep it for Arcadians

This commit is contained in:
Alexey Milovidov 2020-06-15 05:17:08 +03:00
parent d2c66f9688
commit 1ab599b0a0
2 changed files with 7 additions and 2 deletions

View File

@ -47,7 +47,8 @@ public:
String current_user;
String current_query_id;
Poco::Net::SocketAddress current_address;
/// Use current user and password when sending query to replica leader
/// This field is only used in foreign "Arcadia" build.
String current_password;
/// When query_kind == INITIAL_QUERY, these values are equal to current.

View File

@ -660,9 +660,13 @@ void Context::setUser(const String & name, const String & password, const Poco::
auto lock = getLock();
client_info.current_user = name;
client_info.current_password = password;
client_info.current_address = address;
#if defined(ARCADIA_BUILD)
/// This is harmful field that is used only in foreign "Arcadia" build.
client_info.current_password = password;
#endif
auto new_user_id = getAccessControlManager().find<User>(name);
std::shared_ptr<const ContextAccess> new_access;
if (new_user_id)