Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
bc9b118e
Commit
bc9b118e
authored
Jan 31, 2019
by
antirez
Browse files
ACL: don't emit useless flags in ACLDescribeUser().
parent
0f1b06aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/acl.c
View file @
bc9b118e
...
@@ -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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment