mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 10:25:47 +02:00
feat(AclFamilly): add acl list command (#1722)
* Add acl-family source and header * Add `ACL LIST` command * Add a simple test to check the default user
This commit is contained in:
parent
eae02a16da
commit
898061d738
16 changed files with 234 additions and 39 deletions
|
@ -4,9 +4,12 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "base/varz_value.h"
|
||||
#include "core/interpreter.h"
|
||||
#include "facade/service_interface.h"
|
||||
#include "server/acl/user_registry.h"
|
||||
#include "server/cluster/cluster_family.h"
|
||||
#include "server/command_registry.h"
|
||||
#include "server/config_registry.h"
|
||||
|
@ -68,9 +71,8 @@ class Service : public facade::ServiceInterface {
|
|||
|
||||
facade::ConnectionStats* GetThreadLocalConnectionStats() final;
|
||||
|
||||
const CommandId* FindCmd(std::string_view cmd) const {
|
||||
return registry_.Find(cmd);
|
||||
}
|
||||
std::pair<const CommandId*, CmdArgList> FindCmd(CmdArgList args) const;
|
||||
const CommandId* FindCmd(std::string_view) const;
|
||||
|
||||
CommandRegistry* mutable_registry() {
|
||||
return ®istry_;
|
||||
|
@ -145,8 +147,6 @@ class Service : public facade::ServiceInterface {
|
|||
std::optional<facade::ErrorReply> CheckKeysOwnership(const CommandId* cid, CmdArgList args,
|
||||
const ConnectionContext& dfly_cntx);
|
||||
|
||||
const CommandId* FindCmd(CmdArgList args) const;
|
||||
|
||||
void EvalInternal(const EvalArgs& eval_args, Interpreter* interpreter, ConnectionContext* cntx);
|
||||
void CallSHA(CmdArgList args, std::string_view sha, Interpreter* interpreter,
|
||||
ConnectionContext* cntx);
|
||||
|
@ -161,9 +161,9 @@ class Service : public facade::ServiceInterface {
|
|||
|
||||
base::VarzValue::Map GetVarzStats();
|
||||
|
||||
private:
|
||||
util::ProactorPool& pp_;
|
||||
|
||||
acl::UserRegistry user_registry_;
|
||||
ServerFamily server_family_;
|
||||
ClusterFamily cluster_family_;
|
||||
CommandRegistry registry_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue