Skip to content

Commit e4162dc

Browse files
committed
Udates by comments
Fixes #5123
1 parent 7d55ae3 commit e4162dc

File tree

2 files changed

+26
-23
lines changed

2 files changed

+26
-23
lines changed

doc/reference/reference_lua/box_schema/user_disable.rst

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@ box.schema.user.disable()
88

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

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>`).
13-
14-
:param string username: the name of a user to be deactivated
15-
16-
:return: (if success) ``---``
17-
18-
(if failure) ``error: User 'username' is not found``
11+
Revokes ``usage`` and ``session`` permissions from the subject user. Equivalent to the following call:
1912

13+
.. code-block:: lua
14+
box.schema.user.revoke('{username}','usage,session','universe',nil,{if_not_exists=true})
15+
16+
.. NOTE::
2017

21-
**Example:**
18+
``session`` - (cannot be granted to a role) if is not granted, ``IPROTO_AUTH`` always fails connection to the user, so does ``box.session.su()``
19+
``usage`` - (cannot be granted to a role) lets user use their privileges on database objects (e.g. read, write and alter space)
20+
21+
For more information about revoking permissions see section :ref:`box.schema.user.revoke <box_schema-user_revoke>`.
2222

23-
.. code-block:: lua
23+
:param string username: the name of the subject user
24+
25+
:return: (if success) nothing
2426

25-
box.schema.user.disable (username)
26-
---
27+
(if failure) The error is raised ``- error: User 'username' is not found``

doc/reference/reference_lua/box_schema/user_enable.rst

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

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

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>`).
11+
Grants ``usage`` and ``session`` permissions to the subject user. Equivalent to the following call:
1312

14-
:param string username: the name of the subject user
15-
16-
:return: (if success) ``---``
17-
18-
(if failure) ``error: User 'username' is not found``
13+
.. code-block:: lua
14+
box.schema.user.grant('{username}','usage,session','universe',nil,{if_not_exists=true})
15+
16+
.. NOTE::
1917

20-
**Example:**
18+
``session`` - (cannot be granted to a role) if is not granted, ``IPROTO_AUTH`` always fails connection to the user, so does ``box.session.su()``
19+
``usage`` - (cannot be granted to a role) lets user use their privileges on database objects (e.g. read, write and alter space)
20+
21+
For more information about granting permissions see section :ref:`box.schema.user.grant <box_schema-user_grant>`.
2122

22-
.. code-block:: lua
23+
:param string username: the name of the subject user
24+
25+
:return: (if success) nothing
2326

24-
box.schema.user.enable (username)
25-
---
27+
(if failure) The error is raised ``- error: User 'username' is not found``

0 commit comments

Comments
 (0)