box.schema.role.grant()
-
box.schema.role.grant(role-name, permissions, object-type, object-name[, option])¶ -
box.schema.role.grant(role-name, permissions, 'universe'[, nil, option]) -
box.schema.role.grant(role-name, role-name[, nil, nil, option]) Выдача прав роли.
Параметры: - role-name (
string) – the name of the role - permissions (
string) – one or more permissions to grant to the role (for example,readorread,write) - object-type (
string) – a database object type to grant permissions to (for example,space,role, orfunction) - object-name (
string) – the name of a database object to grant permissions to - option (
table) –if_not_exists=true|false(default =false) - boolean;truemeans there should be no error if the role already has the privilege
Должна существовать роль, должен существовать объект.
Variation: instead of
object-type, object-namesayuniversewhich means „all object-types and all objects“. In this case, object name is omitted.Variation: instead of
permissions, object-type, object-namesayrole-name– to grant a role to a role.Пример:
box.schema.role.grant('books_space_manager', 'read,write', 'space', 'books')
See also: Managing roles.
- role-name (