Skip to content
8 changes: 8 additions & 0 deletions doc/reference/reference_lua/box_schema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ Below is a list of all ``box.schema`` functions.
* - :doc:`./box_schema/user_revoke`
- Revoke privileges from a user or a role

* - :doc:`./box_schema/user_enable`
- Activate previously deactivated user

* - :doc:`./box_schema/user_disable`
- Deactivate user

* - :doc:`./box_schema/user_password`
- Get a hash of a user's password

Expand Down Expand Up @@ -105,6 +111,8 @@ Below is a list of all ``box.schema`` functions.
box_schema/user_exists
box_schema/user_grant
box_schema/user_revoke
box_schema/user_enable
box_schema/user_disable
box_schema/user_password
box_schema/user_passwd
box_schema/user_info
Expand Down
23 changes: 23 additions & 0 deletions doc/reference/reference_lua/box_schema/user_disable.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.. _box_schema-user_disable:

===============================================================================
box.schema.user.disable()
===============================================================================

.. module:: box.schema

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

Initiates the :samp:`box.schema.user.revoke('{username}','usage,session','universe',nil,` :code:`{if_exists=true})`
(see section :ref:`box.schema.user.revoke <box_schema-user_revoke>`).

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

:return: ``---``

**Example:**

.. code-block:: lua

box.schema.user.disable (username)
---
25 changes: 25 additions & 0 deletions doc/reference/reference_lua/box_schema/user_enable.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.. _box_schema-user_enable:

===============================================================================
box.schema.user.enable()
===============================================================================

.. module:: box.schema

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

Initiates the :samp:`box.schema.user.grant('{username}','usage,session','universe',nil,` :code:`{if_not_exists=true})` method
(see section :ref:`box.schema.user.grant <box_schema-user_grant>`).

:param string username: the name of the subject user

:return: (if success) ``---``

(if failure) ``error: User 'username' is not found``

**Example:**

.. code-block:: lua

box.schema.user.enable (username)
---
2 changes: 1 addition & 1 deletion doc/reference/reference_lua/box_schema/user_grant.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ box.schema.user.grant()

**Variation:** instead of
:samp:`box.schema.user.grant('{username}','usage,session','universe',nil,` :code:`{if_not_exists=true})`
say :samp:`box.schema.user.enable('{username}')`.
say :samp:`box.schema.user.enable('{username}')` (see section :ref:`box.schema.user.enable <box_schema-user_enable>`).

The possible options are:

Expand Down
2 changes: 1 addition & 1 deletion doc/reference/reference_lua/box_schema/user_revoke.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ box.schema.user.revoke()

**Variation:** instead of
:samp:`box.schema.user.revoke('{username}','usage,session','universe',nil,` :code:`{if_exists=true})`
say :samp:`box.schema.user.disable('{username}')`.
say :samp:`box.schema.user.disable('{username}')` (see section :ref:`box.schema.user.disable <box_schema-user_disable>`).

**Example:**

Expand Down