MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / ACLLookupCommand

Function ACLLookupCommand

src/acl.cpp:684–690  ·  view source on GitHub ↗

Get a command from the original command table, that is not affected * by the command renaming operations: we base all the ACL work from that * table, so that ACLs are valid regardless of command renaming. */

Source from the content-addressed store, hash-verified

682 * by the command renaming operations: we base all the ACL work from that
683 * table, so that ACLs are valid regardless of command renaming. */
684struct redisCommand *ACLLookupCommand(const char *name) {
685 struct redisCommand *cmd;
686 sds sdsname = sdsnew(name);
687 cmd = (redisCommand*)dictFetchValue(g_pserver->orig_commands, sdsname);
688 sdsfree(sdsname);
689 return cmd;
690}
691
692/* Flush the array of allowed subcommands for the specified user
693 * and command ID. */

Callers 1

ACLSetUserFunction · 0.85

Calls 3

sdsnewFunction · 0.85
dictFetchValueFunction · 0.85
sdsfreeFunction · 0.85

Tested by

no test coverage detected