diff --git a/src/pika_client_conn.cc b/src/pika_client_conn.cc index 2643cd30a..35e71e752 100644 --- a/src/pika_client_conn.cc +++ b/src/pika_client_conn.cc @@ -543,8 +543,9 @@ bool PikaClientConn::IsAuthed() const { return authenticated_; } void PikaClientConn::InitUser() { if (g_pika_conf->requirepass().empty()) { user_ = g_pika_server->Acl()->GetUserLock(Acl::DefaultUser); + } else { + user_ = g_pika_server->Acl()->GetUserLock(Acl::DefaultLimitUser); } - user_ = g_pika_server->Acl()->GetUserLock(Acl::DefaultLimitUser); authenticated_ = user_->HasFlags(static_cast(AclUserFlag::NO_PASS)) && !user_->HasFlags(static_cast(AclUserFlag::DISABLED)); }