Commit 67754ae0 authored by antirez's avatar antirez
Browse files

ACL: ACLSetUser(), fix flag and add allcommands +@all opcode.

parent e7d15e48
...@@ -153,8 +153,13 @@ int ACLSetUser(user *u, const char *op) { ...@@ -153,8 +153,13 @@ int ACLSetUser(user *u, const char *op) {
} else if (!strcasecmp(op,"allkeys") || } else if (!strcasecmp(op,"allkeys") ||
!strcasecmp(op,"~*")) !strcasecmp(op,"~*"))
{ {
memset(u->allowed_subcommands,255,sizeof(u->allowed_commands));
u->flags |= USER_FLAG_ALLKEYS; u->flags |= USER_FLAG_ALLKEYS;
if (u->patterns) listEmpty(u->patterns);
} else if (!strcasecmp(op,"allcommands") ||
!strcasecmp(op,"+@all"))
{
memset(u->allowed_subcommands,255,sizeof(u->allowed_commands));
u->flags |= USER_FLAG_ALLCOMMANDS;
} else { } else {
return C_ERR; return C_ERR;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment