Skip to content

Commit 0cdd1fd

Browse files
committed
Adds description of application role editing process
Fixes #5230
1 parent 39fe077 commit 0cdd1fd

File tree

1 file changed

+35
-1
lines changed

1 file changed

+35
-1
lines changed

doc/platform/app/app_roles.rst

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ is used to validate the ``greeting`` value:
163163

164164
If the configuration is not valid, ``validate()`` reports an unrecoverable error by throwing an error object.
165165

166-
167166
.. _roles_create_custom_role_apply:
168167

169168
Applying a role configuration
@@ -182,6 +181,41 @@ In the example below, the ``apply()`` function uses the :ref:`log <log-module>`
182181

183182

184183

184+
.. _roles_create_custom_role_edit:
185+
186+
Editing a role
187+
~~~~~~~~~~~~~~
188+
189+
Editing a custom application role object means changing the contents of its LUA file. To edit a role object, you can do the following:
190+
191+
* Edit, remove, or set to nil the the role configuration schema;
192+
193+
* Edit, remove, or set to nil dependencies;
194+
195+
* Edit, remove, or set to nil the ``on_event`` callback function;
196+
197+
* Edit the role configuration validation function;
198+
199+
* Edit the apply validation function;
200+
201+
* Edit the stopping role function.
202+
203+
.. code-block:: lua
204+
205+
return {
206+
validate = function() -- ... -- end,
207+
apply = function() -- ... -- end,
208+
stop = function() -- ... -- end,
209+
dependencies = { -- ... -- },
210+
on_event = nil
211+
end,
212+
}
213+
214+
215+
Once the editing of the role object is finished, the :ref:`config:reload() <config_api_reference_reload>` is triggered automatically
216+
to apply the changes. However, if the :ref:`config.reload <configuration_reference_config_reload>` option is set to ``manual``,
217+
then the user must manually perform configuration reload or restart Tarantool instance.
218+
185219
.. _roles_create_custom_role_stop:
186220

187221
Stopping a role

0 commit comments

Comments
 (0)