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);
|
||||
u->flags &= ~USER_FLAG_ALLCOMMANDS;
|
||||
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 {
|
||||
errno = EINVAL;
|
||||
return C_ERR;
|
||||
|
Loading…
Reference in New Issue
Block a user