fix after review

This commit is contained in:
Andrey Zvonov 2024-11-18 23:17:10 +00:00
parent 6e58cfc5b8
commit e785bb908e
2 changed files with 5 additions and 3 deletions

View File

@ -833,7 +833,7 @@ void Connection::sendQuery(
writeVectorBinary(external_roles, buffer);
buffer.finalize();
LOG_DEBUG(log_wrapper.get(), "Sending external_roles with query: [{}] ({})", fmt::join(external_roles, ", "), external_roles.size());
LOG_TRACE(log_wrapper.get(), "Sending external_roles with query: [{}] ({})", fmt::join(external_roles, ", "), external_roles.size());
writeStringBinary(external_roles_str, *out);
}
@ -858,6 +858,8 @@ void Connection::sendQuery(
data += query;
data += query_id;
data += client_info->initial_user;
// Also for backwards compatibility
if (server_revision >= DBMS_MIN_PROTOCOL_VERSION_WITH_INTERSERVER_EXTERNALLY_GRANTED_ROLES)
data += external_roles_str;
/// TODO: add source/target host/ip-address

View File

@ -1569,8 +1569,8 @@ void Context::setExternalRolesWithLock(const std::vector<UUID> & new_external_ro
current_roles->insert(current_roles->end(), new_external_roles.begin(), new_external_roles.end());
else
current_roles = std::make_shared<std::vector<UUID>>(new_external_roles);
}
need_recalculate_access = true;
}
}
void Context::setCurrentRolesImpl(const std::vector<UUID> & new_current_roles, bool throw_if_not_granted, bool skip_if_not_granted, const std::shared_ptr<const User> & user)