diff options
author | antirez <antirez@gmail.com> | 2019-01-10 17:01:12 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2019-01-10 17:01:12 +0100 |
commit | 6bb6a6d3a8fb017e6b2e981c76d44ebe56b25b65 (patch) | |
tree | d3a7d309a53dfb30cb5bf83daa872a41e451b02c /src/server.h | |
parent | e4846b028d77b6ee3ee2bdc386104eeba8ba7c85 (diff) | |
download | redis-6bb6a6d3a8fb017e6b2e981c76d44ebe56b25b65.tar.gz |
ACL: implement ACLCreateUser().
Diffstat (limited to 'src/server.h')
-rw-r--r-- | src/server.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server.h b/src/server.h index e120e9894..c09019390 100644 --- a/src/server.h +++ b/src/server.h @@ -712,6 +712,7 @@ typedef struct readyList { * If there is no associated user, the connection uses the default user. */ #define USER_MAX_COMMAND_BIT 1024 #define USER_FLAG_ENABLED (1<<0) /* The user is active. */ +#define USER_FLAG_ALLKEYS (1<<1) /* The user can mention any key. */ typedef struct user { uint64_t flags; /* See USER_FLAG_* */ @@ -731,7 +732,9 @@ typedef struct user { * set to NULL to avoid allocating USER_MAX_COMMAND_BIT pointers. */ sds **allowed_subcommands; list *passwords; /* A list of SDS valid passwords for this user. */ - list *patterns; /* A list of allowed key patterns. */ + list *patterns; /* A list of allowed key patterns. If this field is NULL + the user cannot mention any key in a command, unless + the flag ALLKEYS is set in the user. */ } user; /* With multiplexing we need to take per-client state. |