mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
ACL: setuser reset implemented.
This commit is contained in:
parent
9e5c38282b
commit
8dfeb4fba1
@ -342,6 +342,11 @@ int ACLSetUser(user *u, const char *op, ssize_t oplen) {
|
|||||||
ACLSetUserCommandBit(u,id,0);
|
ACLSetUserCommandBit(u,id,0);
|
||||||
u->flags &= ~USER_FLAG_ALLCOMMANDS;
|
u->flags &= ~USER_FLAG_ALLCOMMANDS;
|
||||||
ACLResetSubcommandsForCommand(u,id);
|
ACLResetSubcommandsForCommand(u,id);
|
||||||
|
} else if (!strcasecmp(op,"reset")) {
|
||||||
|
serverAssert(ACLSetUser(u,"resetpass",-1) == C_OK);
|
||||||
|
serverAssert(ACLSetUser(u,"resetkeys",-1) == C_OK);
|
||||||
|
serverAssert(ACLSetUser(u,"off",-1) == C_OK);
|
||||||
|
serverAssert(ACLSetUser(u,"-@all",-1) == C_OK);
|
||||||
} else {
|
} else {
|
||||||
errno = EINVAL;
|
errno = EINVAL;
|
||||||
return C_ERR;
|
return C_ERR;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user