@@ -199,69 +199,58 @@ def acl_setuser(
199199 """
200200 Create or update an ACL user.
201201
202- Create or update the ACL for `` username` `. If the user already exists,
202+ Create or update the ACL for `username`. If the user already exists,
203203 the existing ACL is completely overwritten and replaced with the
204204 specified values.
205205
206- ``enabled`` is a boolean indicating whether the user should be allowed
207- to authenticate or not. Defaults to ``False``.
208-
209- ``nopass`` is a boolean indicating whether the can authenticate without
210- a password. This cannot be True if ``passwords`` are also specified.
211-
212- ``passwords`` if specified is a list of plain text passwords
213- to add to or remove from the user. Each password must be prefixed with
214- a '+' to add or a '-' to remove. For convenience, the value of
215- ``passwords`` can be a simple prefixed string when adding or
216- removing a single password.
217-
218- ``hashed_passwords`` if specified is a list of SHA-256 hashed passwords
219- to add to or remove from the user. Each hashed password must be
220- prefixed with a '+' to add or a '-' to remove. For convenience,
221- the value of ``hashed_passwords`` can be a simple prefixed string when
222- adding or removing a single password.
223-
224- ``categories`` if specified is a list of strings representing category
225- permissions. Each string must be prefixed with either a '+' to add the
226- category permission or a '-' to remove the category permission.
227-
228- ``commands`` if specified is a list of strings representing command
229- permissions. Each string must be prefixed with either a '+' to add the
230- command permission or a '-' to remove the command permission.
231-
232- ``keys`` if specified is a list of key patterns to grant the user
233- access to. Keys patterns allow '*' to support wildcard matching. For
234- example, '*' grants access to all keys while 'cache:*' grants access
235- to all keys that are prefixed with 'cache:'. ``keys`` should not be
236- prefixed with a '~'.
237-
238- ``reset`` is a boolean indicating whether the user should be fully
239- reset prior to applying the new ACL. Setting this to True will
240- remove all existing passwords, flags and privileges from the user and
241- then apply the specified rules. If this is False, the user's existing
242- passwords, flags and privileges will be kept and any new specified
243- rules will be applied on top.
244-
245- ``reset_keys`` is a boolean indicating whether the user's key
246- permissions should be reset prior to applying any new key permissions
247- specified in ``keys``. If this is False, the user's existing
248- key permissions will be kept and any new specified key permissions
249- will be applied on top.
250-
251- ``reset_channels`` is a boolean indicating whether the user's channel
252- permissions should be reset prior to applying any new channel permissions
253- specified in ``channels``.If this is False, the user's existing
254- channel permissions will be kept and any new specified channel permissions
255- will be applied on top.
256-
257- ``reset_passwords`` is a boolean indicating whether to remove all
258- existing passwords and the 'nopass' flag from the user prior to
259- applying any new passwords specified in 'passwords' or
260- 'hashed_passwords'. If this is False, the user's existing passwords
261- and 'nopass' status will be kept and any new specified passwords
262- or hashed_passwords will be applied on top.
263-
264- For more information see https://redis.io/commands/acl-setuser
206+ For more information, see https://redis.io/commands/acl-setuser
207+
208+ Args:
209+ username: The name of the user whose ACL is to be created or updated.
210+ enabled: Indicates whether the user should be allowed to authenticate.
211+ Defaults to `False`.
212+ nopass: Indicates whether the user can authenticate without a password.
213+ This cannot be `True` if `passwords` are also specified.
214+ passwords: A list of plain text passwords to add to or remove from the user.
215+ Each password must be prefixed with a '+' to add or a '-' to
216+ remove. For convenience, a single prefixed string can be used
217+ when adding or removing a single password.
218+ hashed_passwords: A list of SHA-256 hashed passwords to add to or remove
219+ from the user. Each hashed password must be prefixed with
220+ a '+' to add or a '-' to remove. For convenience, a single
221+ prefixed string can be used when adding or removing a
222+ single password.
223+ categories: A list of strings representing category permissions. Each string
224+ must be prefixed with either a '+' to add the category
225+ permission or a '-' to remove the category permission.
226+ commands: A list of strings representing command permissions. Each string
227+ must be prefixed with either a '+' to add the command permission
228+ or a '-' to remove the command permission.
229+ keys: A list of key patterns to grant the user access to. Key patterns allow
230+ '*' to support wildcard matching. For example, '*' grants access to
231+ all keys while 'cache:*' grants access to all keys that are prefixed
232+ with 'cache:'. `keys` should not be prefixed with a '~'.
233+ reset: Indicates whether the user should be fully reset prior to applying
234+ the new ACL. Setting this to `True` will remove all existing
235+ passwords, flags, and privileges from the user and then apply the
236+ specified rules. If `False`, the user's existing passwords, flags,
237+ and privileges will be kept and any new specified rules will be
238+ applied on top.
239+ reset_keys: Indicates whether the user's key permissions should be reset
240+ prior to applying any new key permissions specified in `keys`.
241+ If `False`, the user's existing key permissions will be kept and
242+ any new specified key permissions will be applied on top.
243+ reset_channels: Indicates whether the user's channel permissions should be
244+ reset prior to applying any new channel permissions
245+ specified in `channels`. If `False`, the user's existing
246+ channel permissions will be kept and any new specified
247+ channel permissions will be applied on top.
248+ reset_passwords: Indicates whether to remove all existing passwords and the
249+ `nopass` flag from the user prior to applying any new
250+ passwords specified in `passwords` or `hashed_passwords`.
251+ If `False`, the user's existing passwords and `nopass`
252+ status will be kept and any new specified passwords or
253+ hashed passwords will be applied on top.
265254 """
266255 encoder = self .get_encoder ()
267256 pieces : List [EncodableT ] = [username ]
0 commit comments