summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2019-01-14 13:21:21 +0100
committerantirez <antirez@gmail.com>2019-01-14 13:21:21 +0100
commit2da2e452ab49e7a7d7f45229e1d9c3a8ce02811a (patch)
treec1f975615bfd6b3ec92b3e6fcd6153a1f67b586f
parent648411eb7dcd5a16cfbd146823cff8aeeb269369 (diff)
downloadredis-2da2e452ab49e7a7d7f45229e1d9c3a8ce02811a.tar.gz
ACL: ACLLCOMMAND flags.
-rw-r--r--src/server.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server.h b/src/server.h
index a15e6cd94..973d3631c 100644
--- a/src/server.h
+++ b/src/server.h
@@ -713,6 +713,7 @@ typedef struct readyList {
#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. */
+#define USER_FLAG_ALLCOMMANDS (1<<2) /* The user can run all commands. */
typedef struct user {
uint64_t flags; /* See USER_FLAG_* */
@@ -755,7 +756,9 @@ typedef struct client {
int argc; /* Num of arguments of current command. */
robj **argv; /* Arguments of current command. */
struct redisCommand *cmd, *lastcmd; /* Last command executed. */
- user *user; /* User associated with this connection. */
+ user *user; /* User associated with this connection. If the
+ user is set to NULL the connection can do
+ anything (admin). */
int reqtype; /* Request protocol type: PROTO_REQ_* */
int multibulklen; /* Number of multi bulk arguments left to read. */
long bulklen; /* Length of bulk argument in multi bulk request. */