Commit bc9b118e authored by antirez's avatar antirez
Browse files

ACL: don't emit useless flags in ACLDescribeUser().

parent 0f1b06aa
...@@ -383,6 +383,10 @@ sds ACLDescribeUser(user *u) { ...@@ -383,6 +383,10 @@ sds ACLDescribeUser(user *u) {
/* Flags. */ /* Flags. */
for (int j = 0; ACLUserFlags[j].flag; j++) { for (int j = 0; ACLUserFlags[j].flag; j++) {
/* Skip the allcommands and allkeys flags because they'll be emitted
* later as ~* and +@all. */
if (ACLUserFlags[j].flag == USER_FLAG_ALLKEYS ||
ACLUserFlags[j].flag == USER_FLAG_ALLCOMMANDS) continue;
if (u->flags & ACLUserFlags[j].flag) { if (u->flags & ACLUserFlags[j].flag) {
res = sdscat(res,ACLUserFlags[j].name); res = sdscat(res,ACLUserFlags[j].name);
res = sdscatlen(res," ",1); res = sdscatlen(res," ",1);
......
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