Skip to content

Commit 6a85e35

Browse files
committed
Updates by comments
1 parent 50e0740 commit 6a85e35

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

doc/reference/reference_lua/box_schema/user_disable.rst

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,21 @@ box.schema.user.disable()
1111
Revokes ``usage`` and ``session`` permissions from the subject user. Equivalent to the following call:
1212

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

19-
* ``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+
* ``session`` - (cannot be granted to a role) allows the binary protocol layer (iproto) to authenticate the user
20+
21+
* ``usage`` - (cannot be granted to a role) lets user use their privileges on database objects (such as read, write and alter space)
2022

21-
* ``usage`` - (cannot be granted to a role) lets user use their privileges on database objects (e.g. read, write and alter space)
22-
2323
For more information about revoking permissions see section :ref:`box.schema.user.revoke <box_schema-user_revoke>`.
2424

2525
:param string username: the name of the subject user
2626

2727
:return: (if success) nothing
2828

29-
(if failure) The error is raised ``- error: User 'username' is not found``
29+
Possible errors:
30+
31+
* ``NO_SUCH_USER`` - in case the subject user is not found.

doc/reference/reference_lua/box_schema/user_enable.rst

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

1313
.. code-block:: lua
1414
15-
box.schema.user.grant('{username}','usage,session','universe',nil,{if_not_exists=true})
16-
15+
box.schema.user.grant(username, 'usage,session', 'universe', nil, {if_not_exists = true})
16+
1717
.. NOTE::
1818

19-
* ``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+
* ``session`` - (cannot be granted to a role) allows the binary protocol layer (iproto) to authenticate the user
20+
21+
* ``usage`` - (cannot be granted to a role) lets user use their privileges on database objects (such as read, write and alter space)
2022

21-
* ``usage`` - (cannot be granted to a role) lets user use their privileges on database objects (e.g. read, write and alter space)
22-
2323
For more information about granting permissions see section :ref:`box.schema.user.grant <box_schema-user_grant>`.
2424

2525
:param string username: the name of the subject user
2626

2727
:return: (if success) nothing
2828

29-
(if failure) The error is raised ``- error: User 'username' is not found``
29+
Possible errors:
30+
31+
* ``NO_SUCH_USER`` - in case the subject user is not found.

0 commit comments

Comments
 (0)