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
21b8560e
Unverified
Commit
21b8560e
authored
Feb 22, 2019
by
Salvatore Sanfilippo
Committed by
GitHub
Feb 22, 2019
Browse files
Merge pull request #5858 from madolson/dev-unstable-acl-deluser
Making deleting users better defined and update documentation
parents
3a7fd48e
fdc4003d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/acl.c
View file @
21b8560e
...
...
@@ -1372,7 +1372,7 @@ void ACLLoadUsersAtStartup(void) {
* ACL USERS
* ACL CAT [<category>]
* ACL SETUSER <username> ... acl rules ...
* ACL DELUSER <username>
* ACL DELUSER <username>
[...]
* ACL GETUSER <username>
*/
void
aclCommand
(
client
*
c
)
{
...
...
@@ -1400,6 +1400,10 @@ void aclCommand(client *c) {
addReplyError
(
c
,
"The 'default' user cannot be removed"
);
return
;
}
}
for
(
int
j
=
2
;
j
<
c
->
argc
;
j
++
)
{
sds
username
=
c
->
argv
[
j
]
->
ptr
;
user
*
u
;
if
(
raxRemove
(
Users
,(
unsigned
char
*
)
username
,
sdslen
(
username
),
...
...
@@ -1546,7 +1550,7 @@ void aclCommand(client *c) {
"USERS -- List all the registered usernames."
,
"SETUSER <username> [attribs ...] -- Create or modify a user."
,
"GETUSER <username> -- Get the user details."
,
"DELUSER <username>
-- Delete a user."
,
"DELUSER <username>
[...]
-- Delete a
list of
user
s
."
,
"CAT -- List available categories."
,
"CAT <category> -- List commands inside category."
,
"WHOAMI -- Return the current connection username."
,
...
...
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