mirror of
https://github.com/fluencelabs/redis
synced 2025-06-15 10:11:21 +00:00
ACL: assign ACL command ID to modules commands.
This commit is contained in:
@ -684,6 +684,7 @@ int RM_CreateCommand(RedisModuleCtx *ctx, const char *name, RedisModuleCmdFunc c
|
|||||||
cp->rediscmd->calls = 0;
|
cp->rediscmd->calls = 0;
|
||||||
dictAdd(server.commands,sdsdup(cmdname),cp->rediscmd);
|
dictAdd(server.commands,sdsdup(cmdname),cp->rediscmd);
|
||||||
dictAdd(server.orig_commands,sdsdup(cmdname),cp->rediscmd);
|
dictAdd(server.orig_commands,sdsdup(cmdname),cp->rediscmd);
|
||||||
|
cp->rediscmd->id = ACLGetCommandID(cmdname); /* ID used for ACL. */
|
||||||
return REDISMODULE_OK;
|
return REDISMODULE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user