ACL GETUSER username
Available since
Time complexity
O(N). Where N is the number of password, command and pattern rules that the user has.
ACL categories
@admin, @slow, @dangerous

The command returns all the rules defined for an existing ACL user.

Specifically, it lists the user’s ACL flags, password hashes, commands, key patterns, channel patterns (Added in version 6.2) and selectors (Added in version 7.0). Additional information may be returned in the future if more metadata is added to the user.

Command rules are always returned in the same format as the one used in the ACL SETUSER command. Before version 7.0, keys and channels were returned as an array of patterns, however in version 7.0 later they are now also returned in same format as the one used in the ACL SETUSER command. Note: This description of command rules reflects the user’s effective permissions, so while it may not be identical to the set of rules used to configure the user, it is still functionally identical.

Selectors are listed in the order they were applied to the user, and include information about commands, key patterns, and channel patterns.

Examples #

Here’s an example configuration for a user

> ACL SETUSER sample on nopass +GET allkeys &* (+SET ~key2)
> ACL GETUSER sample
1) "flags"
2) 1) "on"
   2) "allkeys"
   3) "nopass"
3) "passwords"
4) (empty array)
5) "commands"
6) "+@all"
7) "keys"
8) "~*"
9) "channels"
10) "&*"
11) "selectors"
12) 1) 1) "commands"
       6) "+SET"
       7) "keys"
       8) "~key2"
       9) "channels"
       10) "&*"

History #

Added Pub/Sub channel patterns.
Added selectors and changed the format of key and channel patterns from a list to their rule representation.

Redict logo courtesy of @janWilejan, CC-BY-SA-4.0. Download SVG ⤑

Portions of this website courtesy of Salvatore Sanfilippo, CC-BY-SA-4.0.