summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstitch <111570933+stitchWzc@users.noreply.github.com>2022-12-26 16:56:16 +0800
committerGitHub <noreply@github.com>2022-12-26 10:56:16 +0200
commitf10c81ac2406fc9cacea0f2e9938910db1c751e5 (patch)
treeac977cdd89ed95a3453c20361f7513a9905f6653
parentd693221e9ac4bdf09cf3538ea38e7d7d2799059b (diff)
downloadredis-py-f10c81ac2406fc9cacea0f2e9938910db1c751e5.tar.gz
Support for resetchannels since Redis 6.2.0 (#2514)
-rw-r--r--redis/commands/core.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/redis/commands/core.py b/redis/commands/core.py
index 10eb048..e3a758d 100644
--- a/redis/commands/core.py
+++ b/redis/commands/core.py
@@ -193,6 +193,7 @@ class ACLCommands(CommandsProtocol):
selectors: Optional[Iterable[Tuple[str, KeyT]]] = None,
reset: bool = False,
reset_keys: bool = False,
+ reset_channels: bool = False,
reset_passwords: bool = False,
**kwargs,
) -> ResponseT:
@@ -248,6 +249,12 @@ class ACLCommands(CommandsProtocol):
key permissions will be kept and any new specified key permissions
will be applied on top.
+ ``reset_channels`` is a boolean indicating whether the user's channel
+ permissions should be reset prior to applying any new channel permissions
+ specified in ``channels``.If this is False, the user's existing
+ channel permissions will be kept and any new specified channel permissions
+ will be applied on top.
+
``reset_passwords`` is a boolean indicating whether to remove all
existing passwords and the 'nopass' flag from the user prior to
applying any new passwords specified in 'passwords' or
@@ -266,6 +273,9 @@ class ACLCommands(CommandsProtocol):
if reset_keys:
pieces.append(b"resetkeys")
+ if reset_channels:
+ pieces.append(b"resetchannels")
+
if reset_passwords:
pieces.append(b"resetpass")