Skip to content

Commit 0c0e2c1

Browse files
committed
Updates description by comments
Fixes #5123
1 parent f69a513 commit 0c0e2c1

File tree

2 files changed

+11
-20
lines changed

2 files changed

+11
-20
lines changed

doc/reference/reference_lua/box_schema/user_disable.rst

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,16 @@ box.schema.user.disable()
88

99
.. function:: box.schema.user.disable(username)
1010

11-
Deactivate a user. If :samp:`'{username}'` does not exist, an error is returned.
11+
Initiates the :samp:`box.schema.user.revoke('{username}','usage,session','universe',nil,` :code:`{if_exists=true})`
12+
(see section :ref:`box.schema.user.revoke <box_schema-user_revoke>`).
1213

1314
:param string username: the name of a user to be deactivated
1415

15-
:return: (if success) ``---``
16-
17-
(if failure) ``error: 'User '{username}' doesn''t exist'``
16+
:return: ``---``
1817

1918
**Example:**
2019

2120
.. code-block:: lua
2221
23-
box.schema.user.disable (username)
24-
22+
box.schema.user.disable (username)
2523
---
26-
27-
**Variation:** instead of :samp:`box.schema.user.disable('{username}')`, say
28-
:samp:`box.schema.user.revoke('{username}','usage,session','universe',nil,` :code:`{if_exists=true})`
29-
(see section :ref:`box.schema.user.revoke <box_schema-user_revoke>`).
30-

doc/reference/reference_lua/box_schema/user_enable.rst

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,18 @@ box.schema.user.enable()
88

99
.. function:: box.schema.user.enable(username)
1010

11-
Activate deactivated user. If :samp:`'{username}'` does not exist, it will be created. If :samp:`'{username}'` is already active, nothing changes.
11+
Initiates the :samp:`box.schema.user.grant('{username}','usage,session','universe',nil,` :code:`{if_not_exists=true})` method
12+
(see section :ref:`box.schema.user.grant <box_schema-user_grant>`).
1213

13-
:param string username: the name of a user to be activated
14+
:param string username: the name of the subject user
1415

15-
:return: ``---``
16+
:return: (if success) ``---``
17+
18+
(if failure) ``error: User 'username' is not found``
1619

1720
**Example:**
1821

1922
.. code-block:: lua
2023
21-
box.schema.user.enable (username)
22-
24+
box.schema.user.enable (username)
2325
---
24-
25-
**Variation:** instead of :samp:`box.schema.user.enable('{username}')`, say
26-
:samp:`box.schema.user.grant('{username}','usage,session','universe',nil,` :code:`{if_not_exists=true})`
27-
(see section :ref:`box.schema.user.grant <box_schema-user_grant>`).

0 commit comments

Comments
 (0)