Skip to content

Commit

Permalink
fix InitUser
Browse files Browse the repository at this point in the history
  • Loading branch information
buzhimingyonghu committed Oct 31, 2024
1 parent 0054e94 commit 62754fa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pika_client_conn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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<uint32_t>(AclUserFlag::NO_PASS)) &&
!user_->HasFlags(static_cast<uint32_t>(AclUserFlag::DISABLED));
}
Expand Down

0 comments on commit 62754fa

Please sign in to comment.