ACL DRYRUN
ACL DRYRUN username command [arg [arg ...]]
- Available since:
- Redis Open Source 7.0.0
- Time complexity:
- O(1).
- ACL categories:
-
@admin,@slow,@dangerous, - Compatibility:
- Redis Software and Redis Cloud compatibility
Simulate the execution of a given command by a given user. This command can be used to test the permissions of a given user without having to enable the user or cause the side effects of running the command.
Required arguments
username
The user to run the simulated command as.
command
The command to test.
Optional arguments
arg [arg ...]
The arguments to pass to the tested command.
Examples
> ACL SETUSER VIRGINIA +SET ~*
"OK"
> ACL DRYRUN VIRGINIA SET foo bar
"OK"
> ACL DRYRUN VIRGINIA GET foo
"User VIRGINIA has no permissions to run the 'get' command"
Redis Software and Redis Cloud compatibility
| Redis Software |
Redis Cloud |
Notes |
|---|---|---|
| ✅ Standard |
✅ Standard |
Might reply with "unknown user" for LDAP users even if AUTH succeeds. |
Return information
Any of the following:
- Simple string reply:
OKon success. - Bulk string reply: an error describing why the user can't execute the command.