@@ -1447,11 +1447,24 @@ credentials.users.*
1447
1447
.. confval :: <user_or_role_name>.privileges.lua_call
1448
1448
1449
1449
A list of global user-defined Lua functions that this user or a user with this role can call.
1450
- To allow calling all such functions, specify the ``all `` value.
1450
+ To allow calling a specific function, specify its name as the value.
1451
+ To allow calling all global Lua functions except built-in ones functions, specify the ``all `` value.
1451
1452
1452
1453
This option should be configured together with the ``execute ``
1453
1454
:ref: `permission <configuration_reference_credentials_privileges_permissions >`.
1454
1455
1456
+ To take a previously granted privilege away, specify the ``lua_call `` option without the function name,
1457
+ or with an empty privileges array (furhter options may retain commented-out).
1458
+
1459
+ Since version :doc: `3.3.0 </release/3.3.0 >`, the ``lua_call `` option allows granting users privileges to call specified lua function on
1460
+ the instance in runtime.
1461
+
1462
+ Example to grant and take away custom functions from the 'alice' user:
1463
+
1464
+ .. literalinclude :: /code_snippets/snippets/config/instances.enabled/lua_call/config.yaml
1465
+ :language: yaml
1466
+ :dedent:
1467
+
1455
1468
.. _configuration_reference_credentials_privileges_sql :
1456
1469
1457
1470
.. confval :: <user_or_role_name>.privileges.sql
@@ -3220,26 +3233,6 @@ The ``lua`` section outlines the configuration parameters related to the Lua env
3220
3233
| Default: 2147483648 (2GB)
3221
3234
| Environment variable: TT_LUA_MEMORY
3222
3235
3223
- .. _configuration_reference_lua_call :
3224
-
3225
- .. confval :: lua_call
3226
-
3227
- Since version :doc: `3.3.0 </release/3.3.0 >`, the ``lua_call `` option allows the specified user to perform the specified lua function on
3228
- the instance during runtime.
3229
-
3230
- Via the ``lua_call `` option, one can grant permissions to the function to any user registered on the instance.
3231
-
3232
- Note that the special option ``lua_call: [all] `` is also supported, granting access to all global Lua functions except built-in ones,
3233
- bypassing database restrictions.
3234
-
3235
- After the instance is rebooted, permissions defined via the ``lua_call `` options are reset to the values stored in the database.
3236
-
3237
- Example to grant custom function to the 'alice' user:
3238
-
3239
- .. literalinclude :: /code_snippets/snippets/config/instances.enabled/lua_call/config.yaml
3240
- :language: yaml
3241
- :dedent:
3242
-
3243
3236
.. _configuration_reference_memtx :
3244
3237
3245
3238
memtx
0 commit comments